Fixed crash when deleting 2nd instance of object

This commit is contained in:
enricoturri1966 2023-03-13 11:13:33 +01:00
parent 62b84b7112
commit eb31dcec44

View File

@ -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()