mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Fixing spurious deselection of objects when switching from 3d path
preview to plater using the bottom tool bar & left mouse click.
This is result of the recent commits refactoring the mouse focus
over toolbars handling. 739d8131ab
This commit is contained in:
@@ -421,11 +421,15 @@ bool GLToolbar::on_mouse(wxMouseEvent& evt, GLCanvas3D& parent)
|
|||||||
// mouse anywhere
|
// mouse anywhere
|
||||||
if (!evt.Dragging() && !evt.Leaving() && !evt.Entering() && (m_mouse_capture.parent != nullptr))
|
if (!evt.Dragging() && !evt.Leaving() && !evt.Entering() && (m_mouse_capture.parent != nullptr))
|
||||||
{
|
{
|
||||||
if (m_mouse_capture.any() && (evt.LeftUp() || evt.MiddleUp() || evt.RightUp()))
|
if (m_mouse_capture.any() && (evt.LeftUp() || evt.MiddleUp() || evt.RightUp())) {
|
||||||
// prevents loosing selection into the scene if mouse down was done inside the toolbar and mouse up was down outside it,
|
// prevents loosing selection into the scene if mouse down was done inside the toolbar and mouse up was down outside it,
|
||||||
// as when switching between views
|
// as when switching between views
|
||||||
processed = true;
|
m_mouse_capture.reset();
|
||||||
|
if (contains_mouse(mouse_pos, parent) == -1)
|
||||||
|
// mouse is outside the toolbar
|
||||||
|
m_tooltip.clear();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
m_mouse_capture.reset();
|
m_mouse_capture.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user