mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
Fix a bed type regression (#6893)
This commit is contained in:
parent
cc950f2016
commit
473c7fb3ef
3 changed files with 20 additions and 14 deletions
|
@ -760,16 +760,17 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->tooltip = L("Bed types supported by the printer");
|
def->tooltip = L("Bed types supported by the printer");
|
||||||
def->mode = comSimple;
|
def->mode = comSimple;
|
||||||
def->enum_keys_map = &s_keys_map_BedType;
|
def->enum_keys_map = &s_keys_map_BedType;
|
||||||
|
// Orca: make sure the order of the values is the same as the BedType enum
|
||||||
def->enum_values.emplace_back("Cool Plate");
|
def->enum_values.emplace_back("Cool Plate");
|
||||||
def->enum_values.emplace_back("Textured Cool Plate");
|
|
||||||
def->enum_values.emplace_back("Engineering Plate");
|
def->enum_values.emplace_back("Engineering Plate");
|
||||||
def->enum_values.emplace_back("High Temp Plate");
|
def->enum_values.emplace_back("High Temp Plate");
|
||||||
def->enum_values.emplace_back("Textured PEI Plate");
|
def->enum_values.emplace_back("Textured PEI Plate");
|
||||||
|
def->enum_values.emplace_back("Textured Cool Plate");
|
||||||
def->enum_labels.emplace_back(L("Smooth Cool Plate"));
|
def->enum_labels.emplace_back(L("Smooth Cool Plate"));
|
||||||
def->enum_labels.emplace_back(L("Textured Cool Plate"));
|
|
||||||
def->enum_labels.emplace_back(L("Engineering Plate"));
|
def->enum_labels.emplace_back(L("Engineering Plate"));
|
||||||
def->enum_labels.emplace_back(L("Smooth High Temp Plate"));
|
def->enum_labels.emplace_back(L("Smooth High Temp Plate"));
|
||||||
def->enum_labels.emplace_back(L("Textured PEI Plate"));
|
def->enum_labels.emplace_back(L("Textured PEI Plate"));
|
||||||
|
def->enum_labels.emplace_back(L("Textured Cool Plate"));
|
||||||
def->set_default_value(new ConfigOptionEnum<BedType>(btPC));
|
def->set_default_value(new ConfigOptionEnum<BedType>(btPC));
|
||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
|
|
|
@ -1284,9 +1284,10 @@ void Sidebar::update_all_preset_comboboxes()
|
||||||
|
|
||||||
//p->m_staticText_filament_settings->Update();
|
//p->m_staticText_filament_settings->Update();
|
||||||
|
|
||||||
|
|
||||||
if (is_bbl_vendor || cfg.opt_bool("support_multi_bed_types")) {
|
if (is_bbl_vendor || cfg.opt_bool("support_multi_bed_types")) {
|
||||||
m_bed_type_list->Enable();
|
m_bed_type_list->Enable();
|
||||||
|
// Orca: don't update bed type if loading project
|
||||||
|
if (!p->plater->is_loading_project()) {
|
||||||
auto str_bed_type = wxGetApp().app_config->get_printer_setting(wxGetApp().preset_bundle->printers.get_selected_preset_name(),
|
auto str_bed_type = wxGetApp().app_config->get_printer_setting(wxGetApp().preset_bundle->printers.get_selected_preset_name(),
|
||||||
"curr_bed_type");
|
"curr_bed_type");
|
||||||
if (!str_bed_type.empty()) {
|
if (!str_bed_type.empty()) {
|
||||||
|
@ -1298,8 +1299,10 @@ void Sidebar::update_all_preset_comboboxes()
|
||||||
BedType bed_type = preset_bundle.printers.get_edited_preset().get_default_bed_type(&preset_bundle);
|
BedType bed_type = preset_bundle.printers.get_edited_preset().get_default_bed_type(&preset_bundle);
|
||||||
m_bed_type_list->SelectAndNotify((int) bed_type - 1);
|
m_bed_type_list->SelectAndNotify((int) bed_type - 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
m_bed_type_list->SelectAndNotify(btPEI);
|
// Orca: combobox don't have the btDefault option, so we need to -1
|
||||||
|
m_bed_type_list->SelectAndNotify(btPEI - 1);
|
||||||
m_bed_type_list->Disable();
|
m_bed_type_list->Disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -781,6 +781,8 @@ public:
|
||||||
};
|
};
|
||||||
std::atomic<bool> m_arrange_running{false};
|
std::atomic<bool> m_arrange_running{false};
|
||||||
|
|
||||||
|
bool is_loading_project() const { return m_loading_project; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct priv;
|
struct priv;
|
||||||
std::unique_ptr<priv> p;
|
std::unique_ptr<priv> p;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue