mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-10 10:39:26 -07:00
FIX: the color of volume is incorrect when merging filament
jira: none Change-Id: I13a9d02b1c8ee57e689ce6477b7aebb86c5f7673 (cherry picked from commit 65267b98666567e8ca6d9a76e73500083b7cb6a0)
This commit is contained in:
parent
9bb3532743
commit
fab93abdca
1 changed files with 7 additions and 7 deletions
|
|
@ -760,13 +760,13 @@ void ObjectList::update_filament_values_for_items_when_delete_filament(const siz
|
|||
if (object->volumes.size() > 1) {
|
||||
for (size_t id = 0; id < object->volumes.size(); id++) {
|
||||
item = m_objects_model->GetItemByVolumeId(i, id);
|
||||
if (!item) continue;
|
||||
if (!object->volumes[id]->config.has("extruder") || size_t(object->volumes[id]->config.extruder()) == filament_id + 1) {
|
||||
int new_extruder = object->config.extruder() > filament_id ? object->config.extruder() - 1 : object->config.extruder();
|
||||
if (replace_id >= 0)
|
||||
new_extruder = replace_filament_id;
|
||||
extruder = wxString::Format("%d", new_extruder);
|
||||
object->volumes[id]->config.set_key_value("extruder", new ConfigOptionInt(new_extruder));
|
||||
if (!item)
|
||||
continue;
|
||||
if (!object->volumes[id]->config.has("extruder")) {
|
||||
continue;
|
||||
}
|
||||
else if (size_t(object->volumes[id]->config.extruder()) == filament_id + 1) {
|
||||
object->volumes[id]->config.set_key_value("extruder", new ConfigOptionInt(replace_filament_id));
|
||||
} else {
|
||||
int new_extruder = object->volumes[id]->config.extruder() > filament_id ? object->volumes[id]->config.extruder() - 1 : object->volumes[id]->config.extruder();
|
||||
extruder = wxString::Format("%d", new_extruder);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue