From 0de2bf52c6fc98fe9af69534427cc3ca79e7e1e1 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Wed, 27 Sep 2023 18:03:25 +0800 Subject: [PATCH] FIX:(cali) should not save preset when the select block is empty Jira: 4644 Change-Id: I18b690a983d34521ca7ef6f0a6707e2df9bb1d3d --- src/slic3r/GUI/CalibrationWizardSavePage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/CalibrationWizardSavePage.cpp b/src/slic3r/GUI/CalibrationWizardSavePage.cpp index ee2d24236..1f6fbec5d 100644 --- a/src/slic3r/GUI/CalibrationWizardSavePage.cpp +++ b/src/slic3r/GUI/CalibrationWizardSavePage.cpp @@ -1304,7 +1304,7 @@ void CalibrationFlowCoarseSavePage::set_curr_flow_ratio(const float value) { bool CalibrationFlowCoarseSavePage::get_result(float* out_value, wxString* out_name) { // Check if the value is valid - if (m_coarse_flow_ratio <= 0.0 || m_coarse_flow_ratio >= 2.0) { + if (m_optimal_block_coarse->GetSelection() == -1 || m_coarse_flow_ratio <= 0.0 || m_coarse_flow_ratio >= 2.0) { MessageDialog msg_dlg(nullptr, _L("Please choose a block with smoothest top surface"), wxEmptyString, wxICON_WARNING | wxOK); msg_dlg.ShowModal(); return false; @@ -1436,7 +1436,7 @@ void CalibrationFlowFineSavePage::set_curr_flow_ratio(const float value) { bool CalibrationFlowFineSavePage::get_result(float* out_value, wxString* out_name) { // Check if the value is valid - if (m_fine_flow_ratio <= 0.0 || m_fine_flow_ratio >= 2.0) { + if (m_optimal_block_fine->GetSelection() == -1 || m_fine_flow_ratio <= 0.0 || m_fine_flow_ratio >= 2.0) { MessageDialog msg_dlg(nullptr, _L("Please choose a block with smoothest top surface."), wxEmptyString, wxICON_WARNING | wxOK); msg_dlg.ShowModal(); return false;