Skip to content

Commit

Permalink
ObjectList: After deleting volumes from the object, update the extrud…
Browse files Browse the repository at this point in the history
…er color for the object from the last and only volume
  • Loading branch information
YuSanka committed Feb 22, 2021
1 parent 032df7f commit 03dee86
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/slic3r/GUI/GUI_ObjectList.cpp
Expand Up @@ -2487,6 +2487,13 @@ bool ObjectList::del_subobject_from_object(const int obj_idx, const int idx, con
if (!last_volume->config.empty()) {
object->config.apply(last_volume->config);
last_volume->config.clear();

// update extruder color in ObjectList
wxDataViewItem obj_item = m_objects_model->GetItemById(obj_idx);
if (obj_item) {
wxString extruder = object->config.has("extruder") ? wxString::Format("%d", object->config.extruder()) : _L("default");
m_objects_model->SetExtruder(extruder, obj_item);
}
}
}
}
Expand Down

0 comments on commit 03dee86

Please sign in to comment.