FIX:update_all_preset_comboboxes shoulld not return

jira: STUDIO-12045
Change-Id: Ie507a87f9be6b95350603231a4ef7ee5596f5fdf
This commit is contained in:
zhou.xu 2025-05-15 21:01:44 +08:00 committed by lane.wei
parent 16a066b2b9
commit 1541e256f9

View File

@ -2159,9 +2159,8 @@ void Sidebar::update_all_preset_comboboxes()
if (config) {
m_update_3d_state = true;
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)) {
if (m_soft_first_start && !wxGetApp().get_app_conf_exists()) {
use_default_bed_type();
} else {
@ -2172,8 +2171,7 @@ void Sidebar::update_all_preset_comboboxes()
if (m_is_gcode_file) { //.gcode.3mf case
m_is_gcode_file = false;
set_bed_by_curr_bed_type(config);
}
else if (user_bed_type_flag) {
} else if (user_bed_type_flag) {
if (config->has_section("user_bed_type_list")) {
auto user_bed_type_list = config->get_section("user_bed_type_list");
if (user_bed_type_list.size() > 0 && user_bed_type_list[cur_preset_name].size() > 0) {
@ -2187,6 +2185,9 @@ void Sidebar::update_all_preset_comboboxes()
}
}
}
} else {
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ":no need reset_bed_type_combox_choices";
}
} else {
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ":error:AppConfig is nullptr";
}