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:
authorEnrico Turri <enricoturri@seznam.cz>2019-03-22 15:03:34 +0300
committerEnrico Turri <enricoturri@seznam.cz>2019-03-22 15:03:34 +0300
commitdb21c67f1869eed13483c56ce0a42bfd9d982056 (patch)
tree67ad0edd9000b483377db9ed43090aa25c8bbefb /src/slic3r/GUI/GLToolbar.cpp
parentf5516f24c444d26c0c791f4c239eb35ba60f9f37 (diff)
Changed logic for releasing mouse capture into GLToolbar::on_mouse()
Diffstat (limited to 'src/slic3r/GUI/GLToolbar.cpp')
-rw-r--r--src/slic3r/GUI/GLToolbar.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/slic3r/GUI/GLToolbar.cpp b/src/slic3r/GUI/GLToolbar.cpp
index ac79784ad..1b6570eab 100644
--- a/src/slic3r/GUI/GLToolbar.cpp
+++ b/src/slic3r/GUI/GLToolbar.cpp
@@ -411,24 +411,19 @@ bool GLToolbar::on_mouse(wxMouseEvent& evt, GLCanvas3D& parent)
// mouse anywhere
if (evt.Moving())
+ {
m_tooltip = update_hover_state(mouse_pos, parent);
+ if ((m_mouse_capture.parent != nullptr) && (m_mouse_capture.parent != &parent))
+ m_mouse_capture.reset();
+ }
else if (evt.LeftUp())
m_mouse_capture.left = false;
else if (evt.MiddleUp())
m_mouse_capture.middle = false;
else if (evt.RightUp())
m_mouse_capture.right = false;
- else if (m_mouse_capture.any())
- {
- if (evt.Dragging())
- processed = true;
- else if (evt.Entering() && (m_mouse_capture.parent == &parent))
- // Resets the mouse capture state to avoid setting the dragging event as processed when, for example,
- // the item action opens a modal dialog
- // Keeps the mouse capture state if the entering event happens on different parent from the one
- // who received the button down event, to prevent, for example, dragging when switching between scene views
- m_mouse_capture.reset();
- }
+ else if (evt.Dragging() && m_mouse_capture.any())
+ processed = true;
int item_id = contains_mouse(mouse_pos, parent);
if (item_id == -1)