From 456837d54159765592a749176fb27c5ab943af19 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Tue, 22 Nov 2022 14:40:35 +0100 Subject: [PATCH] Follow-up of fdc9c73340060cea7d8335e1211836681e18cae0 - Alternate implementation of 'When panning/rotating the scene, do not select the hovered feature, if any' --- src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp index 1e4ba61c7..0255bd1e3 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp @@ -254,7 +254,6 @@ GLGizmoMeasure::GLGizmoMeasure(GLCanvas3D& parent, const std::string& icon_filen bool GLGizmoMeasure::on_mouse(const wxMouseEvent &mouse_event) { m_mouse_pos = { double(mouse_event.GetX()), double(mouse_event.GetY()) }; - m_dragging = false; if (mouse_event.Moving()) { // only for sure @@ -262,8 +261,6 @@ bool GLGizmoMeasure::on_mouse(const wxMouseEvent &mouse_event) return false; } else if (mouse_event.Dragging()) { - m_dragging = true; - // Enable/Disable panning/rotating the 3D scene // Ctrl is pressed or the mouse is not hovering a selected volume bool unlock_dragging = mouse_event.CmdDown() || (m_hover_id == -1 && !m_parent.get_selection().contains_volume(m_parent.get_first_hover_volume_idx())); @@ -594,7 +591,7 @@ void GLGizmoMeasure::on_render() m_curr_point_on_feature_position.reset(); } else { - std::optional curr_feature = m_dragging ? m_curr_feature : + std::optional curr_feature = wxGetMouseState().LeftIsDown() ? m_curr_feature : mouse_on_object ? m_measuring->get_feature(model_facet_idx, position_on_model.cast()) : std::nullopt; if (m_curr_feature != curr_feature ||