From eb31dcec4488a3137ee217a73e4438b4138ccbd4 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Mon, 13 Mar 2023 11:13:33 +0100 Subject: [PATCH] Fixed crash when deleting 2nd instance of object --- src/slic3r/GUI/GUI_ObjectManipulation.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index 2a172b91f..415f008fb 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -707,6 +707,12 @@ void ObjectManipulation::update_ui_from_settings() void ObjectManipulation::update_settings_value(const Selection& selection) { + if (selection.is_empty()) { + // No selection, reset the cache. + reset_settings_value(); + return; + } + m_new_move_label_string = L("Position"); m_new_rotate_label_string = L("Rotation"); m_new_scale_label_string = L("Scale factors"); @@ -836,11 +842,6 @@ void ObjectManipulation::update_settings_value(const Selection& selection) #endif // ENABLE_WORLD_COORDINATE m_new_enabled = true; } - else { - // No selection, reset the cache. -// assert(selection.is_empty()); - reset_settings_value(); - } } void ObjectManipulation::update_if_dirty()