FIX:Crash caused by calibrating dialog constructors

JIRA: STUDIO-4416
Change-Id: I7a15b773ab4df86f3e4234dcd8275fd8e17fad19
This commit is contained in:
hu.wang
2023-09-12 16:57:28 +08:00
committed by Lane.Wei
parent 2ad11b3ed2
commit 2336c56887
2 changed files with 13 additions and 12 deletions

View File

@@ -236,13 +236,6 @@ void CalibrationDialog::update_cali(MachineObject *obj)
m_checkbox_list["motor_noise"]->SetValue(false);
}
if (!obj->is_calibration_running() && !m_checkbox_list["vibration"]->GetValue() && !m_checkbox_list["bed_leveling"]->GetValue() && !m_checkbox_list["xcam_cali"]->GetValue() && !m_checkbox_list["motor_noise"]->GetValue()) {
m_calibration_btn->Disable();
m_calibration_btn->SetLabel(_L("No step selected"));
return ;
} else {
m_calibration_btn->Enable();
}
if (obj->is_calibration_running() || obj->is_calibration_done()) {
if (obj->is_calibration_done()) {
@@ -280,6 +273,14 @@ void CalibrationDialog::update_cali(MachineObject *obj)
m_calibration_flow->DeleteAllItems();
m_calibration_btn->SetLabel(_L("Start Calibration"));
}
if (!obj->is_calibration_running() && !m_checkbox_list["vibration"]->GetValue() && !m_checkbox_list["bed_leveling"]->GetValue() &&
!m_checkbox_list["xcam_cali"]->GetValue() && !m_checkbox_list["motor_noise"]->GetValue()) {
m_calibration_btn->Disable();
m_calibration_btn->SetLabel(_L("No step selected"));
}
else if(!obj->is_calibration_running()){
m_calibration_btn->Enable();
}
}
bool CalibrationDialog::is_stage_list_info_changed(MachineObject *obj)