1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-30 11:05:50 +00:00
This commit is contained in:
Enrico Turri
2019-04-11 12:56:37 +02:00
@@ -820,9 +820,17 @@ void GLGizmoSlaSupports::unselect_point(int i)
void GLGizmoSlaSupports::editing_mode_discard_changes() void GLGizmoSlaSupports::editing_mode_discard_changes()
{ {
// 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(); m_editing_mode_cache.clear();
for (const sla::SupportPoint& point : m_model_object->sla_support_points) for (const sla::SupportPoint& point : m_model_object->sla_support_points)
m_editing_mode_cache.emplace_back(point, false); m_editing_mode_cache.emplace_back(point, false);
}
m_editing_mode = false; m_editing_mode = false;
m_unsaved_changes = false; m_unsaved_changes = false;
} }