From d928d6e47e245cdb0a66a66ab8c5dc732e84ece8 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 12 May 2020 14:03:10 +0200 Subject: [PATCH] Hollowing gizmo fix: selection of single holes was recently broken --- src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp | 5 ++++- src/slic3r/GUI/Gizmos/GLGizmoHollow.hpp | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp index b248db1c6..8d4616da3 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp @@ -58,7 +58,10 @@ void GLGizmoHollow::set_sla_support_data(ModelObject*, const Selection&) const ModelObject* mo = m_c->selection_info()->model_object(); if (mo) { - reload_cache(); + if (m_old_mo_id != mo->id()) { + reload_cache(); + m_old_mo_id = mo->id(); + } if (m_c->hollowed_mesh() && m_c->hollowed_mesh()->get_hollowed_mesh()) m_holes_in_drilled_mesh = mo->sla_drain_holes; } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoHollow.hpp b/src/slic3r/GUI/Gizmos/GLGizmoHollow.hpp index 3ee83c345..93e577743 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoHollow.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoHollow.hpp @@ -43,6 +43,8 @@ private: void hollow_mesh(bool postpone_error_messages = false); bool unsaved_changes() const; + ObjectID m_old_mo_id = -1; + // bool m_show_supports = true; float m_new_hole_radius = 2.f; // Size of a new hole. float m_new_hole_height = 6.f;