Fixed preset updating
This commit is contained in:
parent
ae4f116b46
commit
703f367e69
5 changed files with 8 additions and 25 deletions
src/slic3r/GUI
|
@ -796,7 +796,6 @@ void MainFrame::on_presets_changed(SimpleEvent &event)
|
|||
// Update preset combo boxes(Print settings, Filament, Material, Printer) from their respective tabs.
|
||||
auto presets = tab->get_presets();
|
||||
if (m_plater != nullptr && presets != nullptr) {
|
||||
// auto reload_dependent_tabs = tab->get_dependent_tabs();
|
||||
|
||||
// FIXME: The preset type really should be a property of Tab instead
|
||||
Slic3r::Preset::Type preset_type = tab->type();
|
||||
|
@ -804,25 +803,7 @@ void MainFrame::on_presets_changed(SimpleEvent &event)
|
|||
wxASSERT(false);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
m_plater->sidebar().update_presets(preset_type);
|
||||
|
||||
if (preset_type == Slic3r::Preset::TYPE_PRINTER) {
|
||||
// Printer selected at the Printer tab, update "compatible" marks at the print and filament selectors.
|
||||
// XXX: Do this in a more C++ way
|
||||
for (const auto tab_name_other : { "print", "filament", "sla_material" }) {
|
||||
Tab* cur_tab = m_options_tabs[tab_name_other];
|
||||
// If the printer tells us that the print or filament preset has been switched or invalidated,
|
||||
// refresh the print or filament tab page.Otherwise just refresh the combo box.
|
||||
if (reload_dependent_tabs.empty() ||
|
||||
find(reload_dependent_tabs.begin(), reload_dependent_tabs.end(), tab_name_other) ==
|
||||
reload_dependent_tabs.end() )
|
||||
cur_tab->update_tab_ui();
|
||||
else
|
||||
cur_tab->load_current_preset();
|
||||
}
|
||||
}
|
||||
*/
|
||||
m_plater->on_config_change(*tab->get_config());
|
||||
m_plater->sidebar().update_presets(preset_type);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue