diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2020-02-27 12:21:36 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2020-02-27 17:18:15 +0300 |
commit | b2b257424465b7342d6ffd21d9a0382ebef37e88 (patch) | |
tree | 8b2c198f46ad9f31c615436a189b51ecd2040fff /src/slic3r/GUI | |
parent | d6b86b5e2b7841f7a91f4ef3a3a0b08807bbfbe8 (diff) |
Fixed a crash when deleting an object after switching from SLA to FDM
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp | 4 | ||||
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmosManager.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index aa9ce5014..5236407d1 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -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(); diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp index 7d747ceff..91735d986 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp @@ -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()); |