FIX: crash when delete filament
jira: STUDIO-9956 Change-Id: Ibef1db35c2953040bb7df6b53ed3144f3ff85d96
This commit is contained in:
parent
dac00582ae
commit
99837d8c01
|
@ -741,7 +741,7 @@ void ObjectList::update_filament_values_for_items_when_delete_filament(const siz
|
|||
if (replace_id >= 0)
|
||||
new_extruder = replace_filament_id;
|
||||
extruder = wxString::Format("%d", new_extruder);
|
||||
object->config.set_key_value("extruder", new ConfigOptionInt(new_extruder));
|
||||
object->volumes[id]->config.set_key_value("extruder", new ConfigOptionInt(new_extruder));
|
||||
} 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);
|
||||
|
@ -789,9 +789,6 @@ void ObjectList::update_filament_values_for_items_when_delete_filament(const siz
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// BBS
|
||||
wxGetApp().plater()->update();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2642,6 +2642,8 @@ void Sidebar::delete_filament(size_t filament_id, int replace_filament_id) {
|
|||
wxGetApp().plater()->on_filaments_delete(filament_count, filament_id, replace_filament_id > (int)filament_id ? (replace_filament_id - 1) : replace_filament_id);
|
||||
wxGetApp().get_tab(Preset::TYPE_PRINT)->update();
|
||||
wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
|
||||
|
||||
wxGetApp().plater()->update();
|
||||
}
|
||||
|
||||
void Sidebar::change_filament(size_t from_id, size_t to_id)
|
||||
|
|
Loading…
Reference in New Issue