Merge branch 'master' of https://github.com/prusa3d/Slic3r into et_copy_and_paste

This commit is contained in:
Enrico Turri 2019-04-10 15:55:52 +02:00
commit b98659a749

View file

@ -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;
}