FIX: do not care about "use_ams"
jira: [none] Change-Id: I82e151ba38bd6ab0573b41000ea965d1ab4a15e0
This commit is contained in:
parent
caff5d9f38
commit
2fa2bb24b3
|
@ -642,9 +642,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||||
m_checkbox_list["nozzle_offset_cali"] = option_nozzle_offset_cali_cali;
|
m_checkbox_list["nozzle_offset_cali"] = option_nozzle_offset_cali_cali;
|
||||||
|
|
||||||
for (auto print_opt : m_checkbox_list_order) {
|
for (auto print_opt : m_checkbox_list_order) {
|
||||||
if (print_opt != option_use_ams) {
|
print_opt->Bind(EVT_SWITCH_PRINT_OPTION, [this](auto &e) { save_option_vals(); });
|
||||||
print_opt->Bind(EVT_SWITCH_PRINT_OPTION, [this](auto &e) { save_option_vals();});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
option_auto_bed_level->Hide();
|
option_auto_bed_level->Hide();
|
||||||
|
@ -2450,6 +2448,8 @@ void SelectMachineDialog::load_option_vals(MachineObject *obj)
|
||||||
|
|
||||||
for (auto item : m_checkbox_list) {
|
for (auto item : m_checkbox_list) {
|
||||||
PrintOption *opt = item.second;
|
PrintOption *opt = item.second;
|
||||||
|
if (item.second->getParam() == "use_ams") { continue; }
|
||||||
|
|
||||||
const std::string &val = config->get(obj->printer_type, item.first);
|
const std::string &val = config->get(obj->printer_type, item.first);
|
||||||
if (opt->contain_opt(val)) {
|
if (opt->contain_opt(val)) {
|
||||||
opt->setValue(val);
|
opt->setValue(val);
|
||||||
|
@ -2485,7 +2485,10 @@ void SelectMachineDialog::save_option_vals(MachineObject *obj) {
|
||||||
AppConfig *config = wxGetApp().app_config;
|
AppConfig *config = wxGetApp().app_config;
|
||||||
if (!config) return;
|
if (!config) return;
|
||||||
if (!obj) return;
|
if (!obj) return;
|
||||||
for (auto item : m_checkbox_list) { config->set(obj->printer_type, item.first, item.second->getValue());}
|
for (auto item : m_checkbox_list) {
|
||||||
|
if (item.second->getParam() == "use_ams") { continue;}
|
||||||
|
config->set(obj->printer_type, item.first, item.second->getValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectMachineDialog::Enable_Auto_Refill(bool enable)
|
void SelectMachineDialog::Enable_Auto_Refill(bool enable)
|
||||||
|
|
Loading…
Reference in New Issue