Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2020-02-27 19:53:51 +0300
committerLukas Matena <lukasmatena@seznam.cz>2020-02-27 19:58:27 +0300
commit03f17a13e756038603d471c80d22d45012f1059a (patch)
tree8f3f25f83a671bc8b6be2d114643c0dcfb6c8926 /src/slic3r/GUI/Gizmos
parent7c556742205b99000421b89803fd68d8644ff872 (diff)
Bugfix: SLA pad and supports were sometimes shown on instances that should have been hidden
The showing/hiding block cannot depend on whether the mesh was recently updated. It would then not hide the supports and pad, which are calculated later than the hollowed mesh.
Diffstat (limited to 'src/slic3r/GUI/Gizmos')
-rw-r--r--src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp15
-rw-r--r--src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp17
2 files changed, 11 insertions, 21 deletions
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp
index 5f3430a78..f33a7bd8b 100644
--- a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp
+++ b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp
@@ -75,17 +75,12 @@ void GLGizmoHollow::set_sla_support_data(ModelObject*, const Selection&)
if (m_c->has_drilled_mesh())
m_holes_in_drilled_mesh = m_c->m_model_object->sla_drain_holes;
}
+ }
- if (m_state == On) {
- m_parent.toggle_model_objects_visibility(false);
- m_parent.toggle_model_objects_visibility(true, m_c->m_model_object, m_c->m_active_instance);
- m_parent.toggle_sla_auxiliaries_visibility(m_show_supports, m_c->m_model_object, m_c->m_active_instance);
- }
- // following was removed so that it does not show the object when it should
- // be hidden because the supports gizmo is active. on_set_state takes care
- // of showing the object.
- //else
- // m_parent.toggle_model_objects_visibility(true, nullptr, -1);
+ if (m_state == On) {
+ m_parent.toggle_model_objects_visibility(false);
+ m_parent.toggle_model_objects_visibility(true, m_c->m_model_object, m_c->m_active_instance);
+ m_parent.toggle_sla_auxiliaries_visibility(m_show_supports, m_c->m_model_object, m_c->m_active_instance);
}
}
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp
index 368dac037..0e98f7364 100644
--- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp
+++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp
@@ -68,22 +68,17 @@ void GLGizmoSlaSupports::set_sla_support_data(ModelObject* model_object, const S
update_clipping_plane(m_c->m_clipping_plane_was_moved);
- if (m_state == On) {
- m_parent.toggle_model_objects_visibility(false);
- m_parent.toggle_model_objects_visibility(/*! m_c->m_cavity_mesh*/ true, m_c->m_model_object, m_c->m_active_instance);
- m_parent.toggle_sla_auxiliaries_visibility(! m_editing_mode, m_c->m_model_object, m_c->m_active_instance);
- }
- // following was removed so that it does not show the object when it should
- // be hidden because the supports gizmo is active. on_set_state takes care
- // of showing the object.
- //else
- // m_parent.toggle_model_objects_visibility(true, nullptr, -1);
-
disable_editing_mode();
if (m_c->m_model_object)
reload_cache();
}
+ if (m_state == On) {
+ m_parent.toggle_model_objects_visibility(false);
+ m_parent.toggle_model_objects_visibility(true, m_c->m_model_object, m_c->m_active_instance);
+ m_parent.toggle_sla_auxiliaries_visibility(! m_editing_mode, m_c->m_model_object, m_c->m_active_instance);
+ }
+
// If we triggered autogeneration before, check backend and fetch results if they are there
if (m_c->m_model_object) {
if (m_c->m_model_object->sla_points_status == sla::PointsStatus::Generating)