ENH: enable to enter 0 as default cooling temperature

jira: [STUDIO-11360]
Change-Id: Iaede485340c1a88a1a42eceeadf772332fe369a0
(cherry picked from commit 1fd53404176795581cb2fe1e6d69bfe425a04c23)
This commit is contained in:
xin.zhang
2025-04-09 09:31:49 +08:00
committed by Noisyfox
parent 377df07c67
commit aea87dbb66
3 changed files with 17 additions and 12 deletions

View File

@@ -1608,6 +1608,7 @@ wxBoxSizer *StatusBasePanel::create_temp_control(wxWindow *parent)
m_tempCtrl_nozzle = new TempInput(parent, nozzle_id, TEMP_BLANK_STR, TempInputType::TEMP_OF_NORMAL_TYPE, TEMP_BLANK_STR, wxString("monitor_nozzle_temp"),
wxString("monitor_nozzle_temp_active"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER);
m_tempCtrl_nozzle->SetMinSize(TEMP_CTRL_MIN_SIZE_ALIGN_TWO_ICON);
m_tempCtrl_nozzle->AddTemp(0); // zero is default temp
m_tempCtrl_nozzle->SetMinTemp(20);
m_tempCtrl_nozzle->SetMaxTemp(300);
m_tempCtrl_nozzle->SetBorderWidth(FromDIP(2));
@@ -1622,6 +1623,7 @@ wxBoxSizer *StatusBasePanel::create_temp_control(wxWindow *parent)
m_tempCtrl_nozzle_deputy = new TempInput(parent, nozzle_id, TEMP_BLANK_STR, TempInputType::TEMP_OF_NORMAL_TYPE, TEMP_BLANK_STR, wxString("monitor_nozzle_temp"), wxString("monitor_nozzle_temp_active"),
wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER);
m_tempCtrl_nozzle_deputy->SetMinSize(TEMP_CTRL_MIN_SIZE_ALIGN_TWO_ICON);
m_tempCtrl_nozzle_deputy->AddTemp(0); // zero is default temp
m_tempCtrl_nozzle_deputy->SetMinTemp(20);
m_tempCtrl_nozzle_deputy->SetMaxTemp(300);
m_tempCtrl_nozzle_deputy->SetBorderWidth(FromDIP(2));
@@ -1641,6 +1643,7 @@ wxBoxSizer *StatusBasePanel::create_temp_control(wxWindow *parent)
wxWindowID bed_id = wxWindow::NewControlId();
m_tempCtrl_bed = new TempInput(parent, bed_id, TEMP_BLANK_STR, TempInputType::TEMP_OF_NORMAL_TYPE, TEMP_BLANK_STR, wxString("monitor_bed_temp"),
wxString("monitor_bed_temp_active"), wxDefaultPosition,wxDefaultSize, wxALIGN_CENTER);
m_tempCtrl_bed->AddTemp(0); // zero is default temp
m_tempCtrl_bed->SetMinTemp(bed_temp_range[0]);
m_tempCtrl_bed->SetMaxTemp(bed_temp_range[1]);
m_tempCtrl_bed->SetMinSize(TEMP_CTRL_MIN_SIZE_ALIGN_ONE_ICON);
@@ -1656,6 +1659,7 @@ wxBoxSizer *StatusBasePanel::create_temp_control(wxWindow *parent)
wxWindowID frame_id = wxWindow::NewControlId();
m_tempCtrl_chamber = new TempInput(parent, frame_id, TEMP_BLANK_STR, TempInputType::TEMP_OF_NORMAL_TYPE, TEMP_BLANK_STR, wxString("monitor_frame_temp"),
wxString("monitor_frame_temp_active"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER);
m_tempCtrl_chamber->AddTemp(0); // zero is default temp
m_tempCtrl_chamber->SetReadOnly(true);
m_tempCtrl_chamber->SetMinTemp(default_champer_temp_min);
m_tempCtrl_chamber->SetMaxTemp(default_champer_temp_max);
@@ -3001,6 +3005,7 @@ void StatusPanel::update_temp_ctrl(MachineObject *obj)
m_tempCtrl_chamber->Enable();
m_tempCtrl_chamber->SetMinTemp(obj->chamber_temp_edit_min);
m_tempCtrl_chamber->SetMaxTemp(obj->chamber_temp_edit_max);
m_tempCtrl_chamber->AddTemp(0); // zero is default temp
wxCursor cursor(wxCURSOR_IBEAM);
m_tempCtrl_chamber->GetTextCtrl()->SetCursor(cursor);