From e645f4a4eeff19b40268ad62307f845453a972c7 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Wed, 18 Aug 2021 08:59:56 +0200 Subject: [PATCH] Fixed cut contours after cutting an object in gizmo cut --- src/slic3r/GUI/Gizmos/GLGizmoCut.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp index 707726e08..7d3f5c3df 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp @@ -209,8 +209,13 @@ void GLGizmoCut::on_render_input_window(float x, float y, float bottom_limit) m_imgui->end(); - if (cut_clicked && (m_keep_upper || m_keep_lower)) + if (cut_clicked && (m_keep_upper || m_keep_lower)) { perform_cut(m_parent.get_selection()); + m_cut_contours.cut_z = 0.0f; + m_cut_contours.object_idx = -1; + m_cut_contours.instance_idx = -1; + m_cut_contours.contours.reset(); + } } void GLGizmoCut::set_cut_z(double cut_z) @@ -308,9 +313,8 @@ void GLGizmoCut::update_contours() m_cut_contours.contours.set_color(-1, { 1.0f, 1.0f, 1.0f, 1.0f }); } } - else if (box.center() != m_cut_contours.position) { + else if (box.center() != m_cut_contours.position) m_cut_contours.shift = box.center() - m_cut_contours.position; - } } else m_cut_contours.contours.reset();