Fix invalid comparison

This commit is contained in:
thewildmage
2023-06-04 18:11:21 -06:00
parent f578b88862
commit 01ec1ed139

View File

@@ -165,13 +165,18 @@ void PA_Calibration_Dlg::on_extruder_type_changed(wxCommandEvent& event) {
m_tiStartPA->GetTextCtrl()->SetValue(wxString::FromDouble(0.0)); m_tiStartPA->GetTextCtrl()->SetValue(wxString::FromDouble(0.0));
if (m_rbMethod->GetSelection() == CalibMode::Calib_PA_Pattern) { if(!m_bDDE) {
m_tiEndPA->GetTextCtrl()->SetValue(wxString::FromDouble(1.0));
m_tiPAStep->GetTextCtrl()->SetValue(wxString::FromDouble(0.02));
} else if (m_rbMethod->GetSelection() == 2) {
// pattern method
m_tiEndPA->GetTextCtrl()->SetValue(wxString::FromDouble(0.08)); m_tiEndPA->GetTextCtrl()->SetValue(wxString::FromDouble(0.08));
m_tiPAStep->GetTextCtrl()->SetValue(wxString::FromDouble(0.015)); m_tiPAStep->GetTextCtrl()->SetValue(wxString::FromDouble(0.015));
} else { } else {
m_tiEndPA->GetTextCtrl()->SetValue(wxString::FromDouble(m_bDDE ? 0.1 : 1.0)); m_tiEndPA->GetTextCtrl()->SetValue(wxString::FromDouble(0.1));
m_tiPAStep->GetTextCtrl()->SetValue(wxString::FromDouble(m_bDDE ? 0.002 : 0.02)); m_tiPAStep->GetTextCtrl()->SetValue(wxString::FromDouble(0.002));
} }
event.Skip(); event.Skip();
} }
void PA_Calibration_Dlg::on_method_changed(wxCommandEvent& event) { void PA_Calibration_Dlg::on_method_changed(wxCommandEvent& event) {