ObjectList: When object contains only one volume and it's text:

* Add menu item "Edit text" for object menu.
* Apply volume name to the object name
This commit is contained in:
YuSanka 2022-11-11 15:50:43 +01:00
parent c052ff403a
commit 50ef968f59
2 changed files with 28 additions and 11 deletions
src/slic3r/GUI

View file

@ -683,6 +683,10 @@ void ObjectList::update_name_in_list(int obj_idx, int vol_idx) const
return;
m_objects_model->SetName(new_name, item);
// if object has just one volume, rename object too
if (ModelObject* obj = object(obj_idx); obj->volumes.size() == 1)
obj->name = obj->volumes.front()->name;
}
void ObjectList::selection_changed()