From 6e8bdb2c862c95568b2b6f07d95e881cf66a4404 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 14 Jan 2020 14:32:27 +0100 Subject: [PATCH] Fixed update of clipping plane when a gizmo was turned off --- src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp | 5 +---- src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp index 5a99949bf..17154de58 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp @@ -963,10 +963,6 @@ std::string GLGizmoHollow::on_get_name() const } -//const TriangleMesh* GLGizmoHollow::mesh() const { -// return (! m_c->m_mesh ? nullptr : (m_c->m_cavity_mesh ? m_c->m_cavity_mesh.get() : m_c->m_mesh)); -//} - void GLGizmoHollow::on_set_state() { @@ -1004,6 +1000,7 @@ void GLGizmoHollow::on_set_state() //Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("SLA gizmo turned off"))); m_parent.toggle_model_objects_visibility(true); m_clipping_plane_distance = 0.f; + update_clipping_plane(); // Release clippers and the AABB raycaster. m_c->m_object_clipper.reset(); m_c->m_supports_clipper.reset(); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index 4e00b0f77..9b04fd6ab 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -1082,6 +1082,7 @@ void GLGizmoSlaSupports::on_set_state() m_parent.toggle_model_objects_visibility(true); m_normal_cache.clear(); m_clipping_plane_distance = 0.f; + update_clipping_plane(); // Release clippers and the AABB raycaster. m_its = nullptr; m_c->m_object_clipper.reset();