QoL: remember each printer's filament/bed/process settings (#1592)

* init work
TODO:
1. support multi filament
2. support project

* Properly handle filament number change when switching printers
This commit is contained in:
SoftFever 2023-07-25 21:54:34 +08:00 committed by GitHub
parent 6aa3e400d1
commit 7f6f01c4c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 159 additions and 27 deletions

View file

@ -1641,6 +1641,12 @@ void Tab::on_presets_changed()
if (wxGetApp().plater() == nullptr)
return;
// Orca: update presets for the selected printer
if(m_type == Preset::TYPE_PRINTER) {
m_preset_bundle->update_selections(*wxGetApp().app_config);
wxGetApp().plater()->sidebar().on_filaments_change(m_preset_bundle->filament_presets.size());
}
// Instead of PostEvent (EVT_TAB_PRESETS_CHANGED) just call update_presets
wxGetApp().plater()->sidebar().update_presets(m_type);
@ -1652,6 +1658,7 @@ void Tab::on_presets_changed()
else
wxGetApp().plater()->get_partplate_list().set_render_option(false, true);
// Printer selected at the Printer tab, update "compatible" marks at the print and filament selectors.
for (auto t: m_dependent_tabs)
{