Fix:wrong extruder count by switching printers with tab (#7860)
1.Fix: wrong extruder_counts by Switching between multi-extruder printers using tabs 2. unneccessary unsaved dialog
This commit is contained in:
parent
599b0e09eb
commit
ac80575b28
2 changed files with 8 additions and 12 deletions
|
@ -5597,7 +5597,8 @@ bool GUI_App::check_and_save_current_preset_changes(const wxString& caption, con
|
|||
if (remember_choice)
|
||||
act_buttons |= ActionButtons::REMEMBER_CHOISE;
|
||||
UnsavedChangesDialog dlg(caption, header, "", act_buttons);
|
||||
if (dlg.ShowModal() == wxID_CANCEL)
|
||||
bool no_need_change = dlg.getUpdateItemCount() == 0 ? true : false;
|
||||
if (!no_need_change && dlg.ShowModal() == wxID_CANCEL)
|
||||
return false;
|
||||
|
||||
if (dlg.save_preset()) // save selected changes
|
||||
|
|
|
@ -5114,17 +5114,13 @@ bool Tab::select_preset(std::string preset_name, bool delete_current /*=false*/,
|
|||
apply_config_from_cache();
|
||||
|
||||
// Orca: update presets for the selected printer
|
||||
load_current_preset();
|
||||
|
||||
if (m_type == Preset::TYPE_PRINTER && wxGetApp().app_config->get_bool("remember_printer_config")) {
|
||||
m_preset_bundle->update_selections(*wxGetApp().app_config);
|
||||
int extruders_count = m_preset_bundle->printers.get_edited_preset().config.opt<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
if (extruders_count > 1) {
|
||||
// multi tool
|
||||
wxGetApp().plater()->sidebar().on_filaments_change(extruders_count);
|
||||
} else {
|
||||
wxGetApp().plater()->sidebar().on_filaments_change(m_preset_bundle->filament_presets.size());
|
||||
}
|
||||
wxGetApp().plater()->sidebar().on_filaments_change(m_preset_bundle->filament_presets.size());
|
||||
}
|
||||
load_current_preset();
|
||||
|
||||
|
||||
if (delete_third_printer) {
|
||||
wxGetApp().CallAfter([filament_presets, process_presets]() {
|
||||
|
@ -6104,9 +6100,8 @@ void Page::update_visibility(ConfigOptionMode mode, bool update_contolls_visibil
|
|||
#ifdef __WXMSW__
|
||||
if (!m_show) return;
|
||||
// BBS: fix field control position
|
||||
auto groups = this->m_optgroups;
|
||||
wxTheApp->CallAfter([groups]() {
|
||||
for (auto group : groups) {
|
||||
wxTheApp->CallAfter([this]() {
|
||||
for (auto group : m_optgroups) {
|
||||
if (group->custom_ctrl) group->custom_ctrl->fixup_items_positions();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue