From 7fe7d585e7ab2a578c64a87d9e01ff772abf3696 Mon Sep 17 00:00:00 2001 From: womendoushihaoyin Date: Tue, 17 Dec 2024 12:05:04 +0800 Subject: [PATCH] fix an issue that it can't be effective when use objecttable to change filament --- src/slic3r/GUI/GUI_ObjectList.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 58ba81eef5b..15cc1ae5bb7 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -917,6 +917,22 @@ void ObjectList::update_filament_in_config(const wxDataViewItem& item) const int extruder = m_objects_model->GetExtruderNumber(item); m_config->set_key_value("extruder", new ConfigOptionInt(extruder)); + if (m_config->has("sparse_infill_filament")) { + m_config->set("sparse_infill_filament", m_config->option("extruder")->getInt()); + } + else { + m_config->set_key_value("sparse_infill_filament", new ConfigOptionInt(m_config->option("extruder")->getInt())); + } + if (m_config->has("solid_infill_filament")) { + m_config->set("solid_infill_filament", m_config->option("extruder")->getInt()); + } else { + m_config->set_key_value("solid_infill_filament", new ConfigOptionInt(m_config->option("extruder")->getInt())); + } + if (m_config->has("wall_filament")) { + m_config->set("wall_filament", m_config->option("extruder")->getInt()); + } else { + m_config->set_key_value("wall_filament", new ConfigOptionInt(m_config->option("extruder")->getInt())); + } // BBS if (item_type & itObject) {