ENH: all result failed logic

Change-Id: Idbce2d5094e1db6b9721500036030e67942dfb53
This commit is contained in:
liz.li 2023-07-04 21:21:26 +08:00 committed by Lane.Wei
parent f134105b17
commit 4c1dcda7ea
4 changed files with 149 additions and 32 deletions

View file

@ -473,6 +473,13 @@ void PressureAdvanceWizard::on_cali_save()
if (!save_page->get_auto_result(new_pa_cali_results)) {
return;
}
if (save_page->is_all_failed()) {
MessageDialog msg_dlg(nullptr, _L("The failed test result has been droped."), wxEmptyString, wxICON_WARNING | wxOK);
msg_dlg.ShowModal();
show_step(start_step);
return;
}
CalibUtils::set_PA_calib_result(new_pa_cali_results);
}
else if (m_cali_method == CalibrationMethod::CALI_METHOD_MANUAL) {
@ -769,6 +776,12 @@ void FlowRateWizard::on_cali_save()
if (!save_page->get_result(new_results)) {
return;
}
if (save_page->is_all_failed()) {
MessageDialog msg_dlg(nullptr, _L("The failed test result has been droped."), wxEmptyString, wxICON_WARNING | wxOK);
msg_dlg.ShowModal();
show_step(start_step);
return;
}
std::string old_preset_name;
CalibrationPresetPage* preset_page = (static_cast<CalibrationPresetPage*>(preset_step->page));