FIX: fix a bed texture not display issue
1. change default bed_type to "1" in app_config 2. if old app_config.bed_type is 0, change it to 1 Signed-off-by: yifan.wu <yifan.wu@bambulab.com> Change-Id: I9923187ab480b0a4991bfbc13892bfb43b2a990b
This commit is contained in:
parent
5df1317f40
commit
9a0ef5b989
|
@ -290,7 +290,7 @@ void AppConfig::set_defaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get("curr_bed_type").empty()) {
|
if (get("curr_bed_type").empty()) {
|
||||||
set("curr_bed_type", "0");
|
set("curr_bed_type", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BBL_RELEASE_TO_PUBLIC
|
#if BBL_RELEASE_TO_PUBLIC
|
||||||
|
|
|
@ -571,7 +571,14 @@ Sidebar::Sidebar(Plater *parent)
|
||||||
AppConfig *app_config = wxGetApp().app_config;
|
AppConfig *app_config = wxGetApp().app_config;
|
||||||
std::string str_bed_type = app_config->get("curr_bed_type");
|
std::string str_bed_type = app_config->get("curr_bed_type");
|
||||||
int bed_type_value = atoi(str_bed_type.c_str());
|
int bed_type_value = atoi(str_bed_type.c_str());
|
||||||
m_bed_type_list->Select(bed_type_value);
|
// hotfix: btDefault is added as the first one in BedType, and app_config should not be btDefault
|
||||||
|
if (bed_type_value == 0) {
|
||||||
|
app_config->set("curr_bed_type", "1");
|
||||||
|
bed_type_value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int bed_type_idx = bed_type_value - 1;
|
||||||
|
m_bed_type_list->Select(bed_type_idx);
|
||||||
bed_type_sizer->Add(bed_type_title, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(10));
|
bed_type_sizer->Add(bed_type_title, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(10));
|
||||||
bed_type_sizer->Add(m_bed_type_list, 1, wxLEFT | wxRIGHT | wxEXPAND, FromDIP(10));
|
bed_type_sizer->Add(m_bed_type_list, 1, wxLEFT | wxRIGHT | wxEXPAND, FromDIP(10));
|
||||||
vsizer_printer->Add(bed_type_sizer, 0, wxEXPAND | wxTOP, FromDIP(5));
|
vsizer_printer->Add(bed_type_sizer, 0, wxEXPAND | wxTOP, FromDIP(5));
|
||||||
|
|
Loading…
Reference in New Issue