diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 13986f007..fd79cbda0 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -1104,7 +1104,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater) m_sizer_basic_weight_time->Add(m_stext_weight, 0, wxALIGN_CENTER|wxLEFT, FromDIP(6)); /*bed type*/ - auto m_text_bed_type = new Label(m_basic_panel, "Plate: Textured PEI"); + m_text_bed_type = new Label(m_basic_panel); m_text_bed_type->SetFont(Label::Body_13); /*last & next page*/ @@ -4956,6 +4956,31 @@ void SelectMachineDialog::sys_color_changed() bool SelectMachineDialog::Show(bool show) { + show_status(PrintDialogStatus::PrintStatusInit); + + const ConfigOptionDef* bed_type_def = print_config_def.get("curr_bed_type"); + PresetBundle& preset_bundle = *wxGetApp().preset_bundle; + auto cur_preset_name = preset_bundle.printers.get_edited_preset().name; + auto name = wxGetApp().app_config->get_section("user_bed_type_list"); + std::string plate_name = ""; + for (auto it : name) { + if (it.first == cur_preset_name) { + plate_name = it.second; + break; + } + } + if (bed_type_def != nullptr){ + for (auto it : bed_type_def->enum_labels) { + if (it.find(plate_name) != std::string::npos) { + plate_name = it; + break; + } + } + } + + plate_name = "Plate: " + plate_name; + m_text_bed_type->SetLabelText(plate_name); + // set default value when show this dialog if (show) { m_refresh_timer->Start(LIST_REFRESH_INTERVAL); diff --git a/src/slic3r/GUI/SelectMachine.hpp b/src/slic3r/GUI/SelectMachine.hpp index c3206bd27..56779d42d 100644 --- a/src/slic3r/GUI/SelectMachine.hpp +++ b/src/slic3r/GUI/SelectMachine.hpp @@ -359,6 +359,7 @@ private: wxColour m_colour_def_color{wxColour(255, 255, 255)}; wxColour m_colour_bold_color{wxColour(38, 46, 48)}; StateColor m_btn_bg_enable; + Label* m_text_bed_type; std::shared_ptr m_token = std::make_shared(0); std::map m_checkbox_list;