mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-02 04:50:34 -07:00
FIX: crash when delete filament
jira: STUDIO-9956 Change-Id: Ibef1db35c2953040bb7df6b53ed3144f3ff85d96 (cherry picked from commit 99837d8c01e782ef6634ab60a06e05f48ca31437)
This commit is contained in:
parent
2456729002
commit
fbf2ccc226
2 changed files with 3 additions and 4 deletions
|
|
@ -766,7 +766,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);
|
||||
|
|
@ -814,9 +814,6 @@ void ObjectList::update_filament_values_for_items_when_delete_filament(const siz
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// BBS
|
||||
wxGetApp().plater()->update();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2518,6 +2518,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…
Add table
Add a link
Reference in a new issue