Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2020-03-19 14:39:25 +0300
committerbubnikv <bubnikv@gmail.com>2020-03-19 14:39:25 +0300
commit966b2ce3717ad40dbe4b0c5a405e81e8bae33e68 (patch)
tree7c73685b297f5df0b58bbfa965bf97a711e197ea /src/slic3r/GUI/GLToolbar.cpp
parent8f762168babaef655d13eff45426dc22acc89585 (diff)
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. 739d8131abb7832fdcedd2b9a808e92c15fe1618
Diffstat (limited to 'src/slic3r/GUI/GLToolbar.cpp')
-rw-r--r--src/slic3r/GUI/GLToolbar.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/slic3r/GUI/GLToolbar.cpp b/src/slic3r/GUI/GLToolbar.cpp
index cee8d0391..c7b391cd6 100644
--- a/src/slic3r/GUI/GLToolbar.cpp
+++ b/src/slic3r/GUI/GLToolbar.cpp
@@ -421,11 +421,15 @@ bool GLToolbar::on_mouse(wxMouseEvent& evt, GLCanvas3D& parent)
// mouse anywhere
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,
// 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();
}