FIX:update_all_preset_comboboxes shoulld not return

jira: STUDIO-12045
Change-Id: Ie507a87f9be6b95350603231a4ef7ee5596f5fdf
(cherry picked from commit 1541e256f9c858d3e33d5d31d4881e6ebf38e5b7)
This commit is contained in:
zhou.xu
2025-05-15 21:01:44 +08:00
committed by Noisyfox
parent d8f86e85ef
commit e13e6c7897

View File

@@ -2238,9 +2238,8 @@ void Sidebar::update_all_preset_comboboxes()
// Orca: don't update bed type if loading project
if (!p->plater->is_loading_project()) {
bool has_changed = reset_bed_type_combox_choices();
if (m_begin_sync_printer_status && !has_changed) {
return;
}
bool flag = m_begin_sync_printer_status && !has_changed;
if (!(flag)) {
auto str_bed_type = wxGetApp().app_config->get_printer_setting(wxGetApp().preset_bundle->printers.get_selected_preset_name(),
"curr_bed_type");
if (!str_bed_type.empty()) {
@@ -2254,6 +2253,9 @@ void Sidebar::update_all_preset_comboboxes()
BedType bed_type = preset_bundle.printers.get_edited_preset().get_default_bed_type(&preset_bundle);
p->combo_printer_bed->SelectAndNotify((int) bed_type - 1);
}
} else {
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ":no need reset_bed_type_combox_choices";
}
}
} else {
// m_bed_type_list->SelectAndNotify(btPEI - 1);