SPE-1674 - Follow-up of 9efed4be22 - More robust fix

This commit is contained in:
enricoturri1966 2023-04-24 10:01:32 +02:00
parent c9a55c2c01
commit b37d4e5b6c

View File

@ -3189,9 +3189,15 @@ 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 (m_mouse.dragging && !evt.LeftIsDown() && !evt.RightIsDown() && !evt.MiddleIsDown()) {
// ensure to stop layers editing if enabled
if (m_layers_editing.state != LayersEditing::Unknown) {
m_layers_editing.state = LayersEditing::Unknown;
_stop_timer();
m_layers_editing.accept_changes(*this);
}
mouse_up_cleanup();
}
//#if defined(__WXMSW__) || defined(__linux__)
// // On Windows and Linux needs focus in order to catch key events