Fixed a crash when deleting an object after switching from SLA to FDM
This commit is contained in:
parent
d6b86b5e2b
commit
b2b2574244
2 changed files with 5 additions and 5 deletions
|
@ -63,10 +63,6 @@ bool GLGizmoSlaSupports::on_init()
|
|||
|
||||
void GLGizmoSlaSupports::set_sla_support_data(ModelObject* model_object, const Selection& selection)
|
||||
{
|
||||
// Update common data for hollowing and sla support gizmos.
|
||||
if (wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA)
|
||||
m_c->update_from_backend(m_parent, model_object);
|
||||
|
||||
if (m_c->recent_update) {
|
||||
if (m_state == On)
|
||||
m_c->build_AABB_if_needed();
|
||||
|
|
|
@ -345,9 +345,13 @@ void GLGizmosManager::set_flattening_data(const ModelObject* model_object)
|
|||
|
||||
void GLGizmosManager::set_sla_support_data(ModelObject* model_object)
|
||||
{
|
||||
if (!m_enabled || m_gizmos.empty())
|
||||
if (! m_enabled
|
||||
|| m_gizmos.empty()
|
||||
|| wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA)
|
||||
return;
|
||||
|
||||
m_common_gizmos_data->update_from_backend(m_parent, model_object);
|
||||
|
||||
auto* gizmo_supports = dynamic_cast<GLGizmoSlaSupports*>(m_gizmos[SlaSupports].get());
|
||||
auto* gizmo_hollow = dynamic_cast<GLGizmoHollow*>(m_gizmos[Hollow].get());
|
||||
|
||||
|
|
Loading…
Reference in a new issue