mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
ENH: disable the nozzle settings in Studio
jira: [STUDIO-11489] Change-Id: Id26f06d312ea04ba3aaea9ec4539860f72533078 (cherry picked from commit 8fb88001af3cea8c94adb1f1ace00795cb4be299)
This commit is contained in:
@@ -638,12 +638,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();
|
||||
@@ -728,13 +734,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();
|
||||
@@ -875,6 +887,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();
|
||||
@@ -914,10 +929,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)
|
||||
@@ -958,10 +969,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);
|
||||
@@ -1000,4 +1007,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
|
||||
|
||||
Reference in New Issue
Block a user