From 9efed4be225615b3fac420bc2993cd0cb1e3429c Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Wed, 12 Apr 2023 15:08:00 +0200 Subject: [PATCH] SPE-1438 - Reset mouse dragging state when entering the 3D scene after the user released the mouse buttons outside of it --- src/slic3r/GUI/GLCanvas3D.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index d04fc7f98..72aaa5944 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3189,6 +3189,10 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) m_canvas->SetFocus(); 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__) // // On Windows and Linux needs focus in order to catch key events // Set focus in order to remove it from object list