From 03dee860713a6161479c401cc1fc4b46ef6697c2 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 22 Feb 2021 18:50:01 +0100 Subject: [PATCH] ObjectList: After deleting volumes from the object, update the extruder color for the object from the last and only volume --- src/slic3r/GUI/GUI_ObjectList.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index ff76c625e..5e4dd8789 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -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); + } } } }