Fixed update of clipping plane when a gizmo was turned off

This commit is contained in:
Lukas Matena 2020-01-14 14:32:27 +01:00
parent 8c8256c6a2
commit 6e8bdb2c86
2 changed files with 2 additions and 4 deletions

View file

@ -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() void GLGizmoHollow::on_set_state()
{ {
@ -1004,6 +1000,7 @@ void GLGizmoHollow::on_set_state()
//Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("SLA gizmo turned off"))); //Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("SLA gizmo turned off")));
m_parent.toggle_model_objects_visibility(true); m_parent.toggle_model_objects_visibility(true);
m_clipping_plane_distance = 0.f; m_clipping_plane_distance = 0.f;
update_clipping_plane();
// Release clippers and the AABB raycaster. // Release clippers and the AABB raycaster.
m_c->m_object_clipper.reset(); m_c->m_object_clipper.reset();
m_c->m_supports_clipper.reset(); m_c->m_supports_clipper.reset();

View file

@ -1082,6 +1082,7 @@ void GLGizmoSlaSupports::on_set_state()
m_parent.toggle_model_objects_visibility(true); m_parent.toggle_model_objects_visibility(true);
m_normal_cache.clear(); m_normal_cache.clear();
m_clipping_plane_distance = 0.f; m_clipping_plane_distance = 0.f;
update_clipping_plane();
// Release clippers and the AABB raycaster. // Release clippers and the AABB raycaster.
m_its = nullptr; m_its = nullptr;
m_c->m_object_clipper.reset(); m_c->m_object_clipper.reset();