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.
This commit is contained in:
parent
7c55674220
commit
03f17a13e7
@ -75,18 +75,13 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user