ENH: disable the nozzle settings in Studio
jira: [STUDIO-11489] Change-Id: Id26f06d312ea04ba3aaea9ec4539860f72533078
This commit is contained in:
parent
45a4186cd3
commit
8fb88001af
|
@ -55,7 +55,8 @@
|
|||
"printer_arch": "core_xy",
|
||||
"printer_series": "series_x1",
|
||||
"has_cali_line": true,
|
||||
"printer_is_enclosed": true
|
||||
"printer_is_enclosed": true,
|
||||
"enable_set_nozzle_info": true
|
||||
},
|
||||
"01.01.01.00": {
|
||||
"print": {
|
||||
|
|
|
@ -55,7 +55,8 @@
|
|||
"printer_arch": "core_xy",
|
||||
"printer_series": "series_x1",
|
||||
"has_cali_line": true,
|
||||
"printer_is_enclosed": true
|
||||
"printer_is_enclosed": true,
|
||||
"enable_set_nozzle_info": true
|
||||
},
|
||||
"01.01.01.00": {
|
||||
"print": {
|
||||
|
|
|
@ -51,7 +51,8 @@
|
|||
"printer_arch": "core_xy",
|
||||
"printer_series": "series_p1p",
|
||||
"has_cali_line": false,
|
||||
"printer_is_enclosed": false
|
||||
"printer_is_enclosed": false,
|
||||
"enable_set_nozzle_info": true
|
||||
},
|
||||
"01.02.00.00": {
|
||||
"print": {
|
||||
|
|
|
@ -51,7 +51,8 @@
|
|||
"printer_arch": "core_xy",
|
||||
"printer_series": "series_p1p",
|
||||
"has_cali_line": false,
|
||||
"printer_is_enclosed": true
|
||||
"printer_is_enclosed": true,
|
||||
"enable_set_nozzle_info": true
|
||||
},
|
||||
"01.02.99.10": {
|
||||
"print": {
|
||||
|
|
|
@ -59,7 +59,8 @@
|
|||
"printer_arch": "core_xy",
|
||||
"printer_series": "series_x1",
|
||||
"has_cali_line": true,
|
||||
"printer_is_enclosed": true
|
||||
"printer_is_enclosed": true,
|
||||
"enable_set_nozzle_info": true
|
||||
},
|
||||
"01.05.06.06": {
|
||||
"rv2166": "00.00.21.20"
|
||||
|
|
|
@ -51,7 +51,8 @@
|
|||
"printer_arch": "i3",
|
||||
"printer_series": "series_n",
|
||||
"has_cali_line": false,
|
||||
"printer_is_enclosed": false
|
||||
"printer_is_enclosed": false,
|
||||
"enable_set_nozzle_info": true
|
||||
},
|
||||
"01.01.50.01": {
|
||||
"print": {
|
||||
|
|
|
@ -51,7 +51,8 @@
|
|||
"printer_arch": "i3",
|
||||
"printer_series": "series_n",
|
||||
"has_cali_line": false,
|
||||
"printer_is_enclosed": false
|
||||
"printer_is_enclosed": false,
|
||||
"enable_set_nozzle_info": true
|
||||
},
|
||||
"01.01.50.01": {
|
||||
"print": {
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
"printer_arch": "core_xy",
|
||||
"printer_series": "series_o",
|
||||
"has_cali_line": true,
|
||||
"printer_is_enclosed": true
|
||||
"printer_is_enclosed": true,
|
||||
"enable_set_nozzle_info": false
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
02.00.00.12
|
||||
02.00.00.13
|
|
@ -7533,7 +7533,11 @@ std::string DeviceManager::get_printer_ext_img(std::string type_str, int pos) {
|
|||
}
|
||||
|
||||
bool DeviceManager::get_printer_is_enclosed(std::string type_str) {
|
||||
return get_value_from_config<bool>(type_str, "printer_is_enclosed");
|
||||
return get_value_from_config<bool>(type_str, "printer_is_enclosed"); }
|
||||
|
||||
bool DeviceManager::get_printer_can_set_nozzle(std::string type_str)
|
||||
{
|
||||
return get_value_from_config<bool>(type_str, "enable_set_nozzle_info");
|
||||
}
|
||||
|
||||
std::vector<std::string> DeviceManager::get_resolution_supported(std::string type_str)
|
||||
|
|
|
@ -1474,6 +1474,7 @@ public:
|
|||
static PrinterArch get_printer_arch(std::string type_str);
|
||||
static std::string get_ftp_folder(std::string type_str);
|
||||
static bool get_printer_is_enclosed(std::string type_str);
|
||||
static bool get_printer_can_set_nozzle(std::string type_str);// can set nozzle from studio
|
||||
static bool load_filaments_blacklist_config();
|
||||
static std::vector<std::string> get_resolution_supported(std::string type_str);
|
||||
static std::vector<std::string> get_compatible_machine(std::string type_str);
|
||||
|
|
|
@ -13687,8 +13687,14 @@ bool Plater::check_printer_initialized(MachineObject *obj, bool only_warning)
|
|||
|
||||
if (!has_been_initialized) {
|
||||
if (!only_warning) {
|
||||
|
||||
if (DeviceManager::get_printer_can_set_nozzle(obj->printer_type)) {
|
||||
MessageDialog dlg(wxGetApp().plater(), _L("The nozzle type is not set. Please set the nozzle and try again."), _L("Warning"), wxOK | wxICON_WARNING);
|
||||
dlg.ShowModal();
|
||||
} else {
|
||||
MessageDialog dlg(wxGetApp().plater(), _L("The nozzle type is not set. Please check."), _L("Warning"), wxOK | wxICON_WARNING);
|
||||
dlg.ShowModal();
|
||||
}
|
||||
|
||||
PrinterPartsDialog *print_parts_dlg = new PrinterPartsDialog(nullptr);
|
||||
print_parts_dlg->update_machine_obj(obj);
|
||||
|
|
|
@ -640,12 +640,18 @@ PrinterPartsDialog::PrinterPartsDialog(wxWindow* parent)
|
|||
line_sizer_nozzle_diameter->Add(0, 0, 1, wxEXPAND, 5);
|
||||
line_sizer_nozzle_diameter->Add(nozzle_diameter_checkbox, 0, wxALIGN_CENTER, 5);
|
||||
|
||||
change_nozzle_tips = new Label(single_panel, _L("*Tips: If you changed your nozzle lately, please change settings on printer screen."));
|
||||
change_nozzle_tips->SetFont(Label::Body_13);
|
||||
change_nozzle_tips->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
|
||||
single_sizer->Add(m_line, 0, wxEXPAND, 0);
|
||||
single_sizer->Add(0, 0, 0, wxTOP, FromDIP(24));
|
||||
single_sizer->Add(line_sizer_nozzle_type, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(10));
|
||||
single_sizer->Add(0, 0, 0, wxTOP, FromDIP(24));
|
||||
single_sizer->Add(line_sizer_nozzle_diameter, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(10));
|
||||
single_sizer->Add(0, 0, 0, wxTOP, FromDIP(24));
|
||||
single_sizer->Add(change_nozzle_tips, 0, wxLEFT, FromDIP(24));
|
||||
single_sizer->Add(0, 0, 0, wxTOP, FromDIP(10));
|
||||
|
||||
single_panel->SetSizer(single_sizer);
|
||||
single_panel->Layout();
|
||||
|
@ -730,13 +736,19 @@ PrinterPartsDialog::PrinterPartsDialog(wxWindow* parent)
|
|||
multiple_right_line_sizer->Add(0, 0, 1, wxLEFT, FromDIP(8));
|
||||
multiple_right_line_sizer->Add(multiple_right_nozzle_flow_checkbox, 0, wxALIGN_CENTER, 0);
|
||||
|
||||
multiple_change_nozzle_tips = new Label(multiple_panel, _L("*Tips: If you changed your nozzle lately, please change settings on printer screen."));
|
||||
multiple_change_nozzle_tips->SetFont(Label::Body_13);
|
||||
multiple_change_nozzle_tips->SetForegroundColour(STATIC_TEXT_CAPTION_COL);
|
||||
|
||||
multiple_sizer->Add(0, 0, 0, wxTOP, FromDIP(40));
|
||||
multiple_sizer->Add(leftTitle, 0, wxLEFT, FromDIP(18));
|
||||
multiple_sizer->Add(multiple_left_line_sizer, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, FromDIP(18));
|
||||
multiple_sizer->Add(0, 0, 0, wxTOP, FromDIP(24));
|
||||
multiple_sizer->Add(rightTitle, 0, wxLEFT, FromDIP(18));
|
||||
multiple_sizer->Add(multiple_right_line_sizer, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(18));
|
||||
multiple_sizer->Add(0, 0, 0, wxTOP, FromDIP(40));
|
||||
multiple_sizer->Add(0, 0, 0, wxTOP, FromDIP(20));
|
||||
multiple_sizer->Add(multiple_change_nozzle_tips, 0, wxLEFT, FromDIP(18));
|
||||
multiple_sizer->Add(0, 0, 0, wxTOP, FromDIP(10));
|
||||
|
||||
multiple_panel->SetSizer(multiple_sizer);
|
||||
multiple_panel->Layout();
|
||||
|
@ -950,6 +962,9 @@ bool PrinterPartsDialog::Show(bool show)
|
|||
wxGetApp().UpdateDlgDarkUI(this);
|
||||
CentreOnParent();
|
||||
|
||||
/*disable editing*/
|
||||
EnableEditing(DeviceManager::get_printer_can_set_nozzle(obj->printer_type));
|
||||
|
||||
if (obj->m_extder_data.extders.size() <= 1) {
|
||||
single_panel->Show();
|
||||
multiple_panel->Hide();
|
||||
|
@ -989,10 +1004,6 @@ bool PrinterPartsDialog::Show(bool show)
|
|||
auto diameter = obj->m_extder_data.extders[DEPUTY_NOZZLE_ID].current_nozzle_diameter;
|
||||
auto flow_type = obj->m_extder_data.extders[DEPUTY_NOZZLE_ID].current_nozzle_flow_type;
|
||||
|
||||
multiple_left_nozzle_type_checkbox->Enable();
|
||||
multiple_left_nozzle_diameter_checkbox->Enable();
|
||||
multiple_left_nozzle_flow_checkbox->Enable();
|
||||
|
||||
multiple_left_nozzle_diameter_checkbox->Clear();
|
||||
|
||||
if (type == NozzleType::ntUndefine)
|
||||
|
@ -1033,10 +1044,6 @@ bool PrinterPartsDialog::Show(bool show)
|
|||
|
||||
multiple_right_nozzle_diameter_checkbox->Clear();
|
||||
|
||||
multiple_right_nozzle_type_checkbox->Enable();
|
||||
multiple_right_nozzle_diameter_checkbox->Enable();
|
||||
multiple_right_nozzle_flow_checkbox->Enable();
|
||||
|
||||
if (type == NozzleType::ntUndefine)
|
||||
{
|
||||
multiple_right_nozzle_type_checkbox->SetValue(wxEmptyString);
|
||||
|
@ -1075,4 +1082,20 @@ bool PrinterPartsDialog::Show(bool show)
|
|||
return DPIDialog::Show(show);
|
||||
}
|
||||
|
||||
void PrinterPartsDialog::EnableEditing(bool enable) {
|
||||
|
||||
nozzle_type_checkbox->Enable(enable);
|
||||
nozzle_diameter_checkbox->Enable(enable);
|
||||
|
||||
multiple_left_nozzle_type_checkbox->Enable(enable);
|
||||
multiple_left_nozzle_diameter_checkbox->Enable(enable);
|
||||
multiple_left_nozzle_flow_checkbox->Enable(enable);
|
||||
|
||||
multiple_right_nozzle_type_checkbox->Enable(enable);
|
||||
multiple_right_nozzle_diameter_checkbox->Enable(enable);
|
||||
multiple_right_nozzle_flow_checkbox->Enable(enable);
|
||||
|
||||
change_nozzle_tips->Show(!enable);
|
||||
multiple_change_nozzle_tips->Show(!enable);
|
||||
}
|
||||
}} // namespace Slic3r::GUI
|
||||
|
|
|
@ -39,6 +39,7 @@ protected:
|
|||
|
||||
ComboBox* nozzle_type_checkbox;
|
||||
ComboBox* nozzle_diameter_checkbox;
|
||||
Label *change_nozzle_tips;
|
||||
|
||||
ComboBox* multiple_left_nozzle_type_checkbox;
|
||||
ComboBox *multiple_left_nozzle_diameter_checkbox;
|
||||
|
@ -48,6 +49,8 @@ protected:
|
|||
ComboBox *multiple_right_nozzle_diameter_checkbox;
|
||||
ComboBox *multiple_right_nozzle_flow_checkbox;
|
||||
|
||||
Label *multiple_change_nozzle_tips;
|
||||
|
||||
wxPanel *single_panel;
|
||||
wxPanel *multiple_panel;
|
||||
|
||||
|
@ -67,6 +70,10 @@ public:
|
|||
void on_dpi_changed(const wxRect& suggested_rect) override;
|
||||
void update_machine_obj(MachineObject* obj_);
|
||||
bool Show(bool show) override;
|
||||
|
||||
private:
|
||||
void EnableEditing(bool enable);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue