diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index 8c8f24ba0..74c6faa85 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -820,11 +820,19 @@ void GLGizmoSlaSupports::unselect_point(int i) void GLGizmoSlaSupports::editing_mode_discard_changes() { - m_editing_mode_cache.clear(); - for (const sla::SupportPoint& point : m_model_object->sla_support_points) - m_editing_mode_cache.emplace_back(point, false); - m_editing_mode = false; - m_unsaved_changes = false; + // If the points were autogenerated, they may not be on the ModelObject yet. + // Because the user probably messed with the cache, we will get the data + // from the backend again. + + if (m_model_object->sla_points_status == sla::PointsStatus::AutoGenerated) + get_data_from_backend(); + else { + m_editing_mode_cache.clear(); + for (const sla::SupportPoint& point : m_model_object->sla_support_points) + m_editing_mode_cache.emplace_back(point, false); + } + m_editing_mode = false; + m_unsaved_changes = false; }