FIX: Add bed type in send print page
jira: STUDIO-7824 Change-Id: I64d9ed41b862ed4e3b8c21218c289132d767105e
This commit is contained in:
parent
706c79f4f4
commit
7bb5060b73
|
@ -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);
|
||||
|
|
|
@ -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<int> m_token = std::make_shared<int>(0);
|
||||
std::map<std::string, CheckBox *> m_checkbox_list;
|
||||
|
|
Loading…
Reference in New Issue