SPE-1438 - Reset mouse dragging state when entering the 3D scene after the user released the mouse buttons outside of it

This commit is contained in:
enricoturri1966 2023-04-12 15:08:00 +02:00
parent 88f4fa20df
commit 9efed4be22

View File

@ -3189,6 +3189,10 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
m_canvas->SetFocus(); m_canvas->SetFocus();
if (evt.Entering()) { if (evt.Entering()) {
if (m_mouse.dragging && !evt.LeftIsDown() && !evt.RightIsDown() && !evt.MiddleIsDown())
// reset dragging state if the user released the mouse button outside the 3D scene
m_mouse.dragging = false;
//#if defined(__WXMSW__) || defined(__linux__) //#if defined(__WXMSW__) || defined(__linux__)
// // On Windows and Linux needs focus in order to catch key events // // On Windows and Linux needs focus in order to catch key events
// Set focus in order to remove it from object list // Set focus in order to remove it from object list