From e8558bc9032b46970d7a691cf8f92305aba483cc Mon Sep 17 00:00:00 2001 From: "liz.li" Date: Tue, 20 Jun 2023 16:20:01 +0800 Subject: [PATCH] FIX: cali: restore to save page need to sync data once Change-Id: Idc425ab271436f5b36afcc0c09170384c3ac936b --- src/slic3r/GUI/CalibrationWizard.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/CalibrationWizard.cpp b/src/slic3r/GUI/CalibrationWizard.cpp index a833f0edf..89fee36a6 100644 --- a/src/slic3r/GUI/CalibrationWizard.cpp +++ b/src/slic3r/GUI/CalibrationWizard.cpp @@ -2078,8 +2078,10 @@ void PressureAdvanceWizard::request_calib_result() { if (curr_obj->has_get_pa_calib_result) { if (!has_get_result) { CalibUtils::get_PA_calib_results(m_calib_results); - if (m_calib_results.size() > 0) + if (m_calib_results.size() > 0) { has_get_result = true; + sync_save_page_data(); + } } } } @@ -2299,13 +2301,13 @@ void PressureAdvanceWizard::sync_save_page_data() { set_edit_mode("normal"); comboBox_tray_name->GetTextCtrl()->Bind(wxEVT_KEY_DOWN, [this, result_failed, index, fcb, comboBox_tray_name](auto& e) { if (wxGetKeyState(WXK_RETURN)) { - this->m_calib_results[index].name = comboBox_tray_name->GetValue().ToStdString(); + this->m_calib_results[index].name = comboBox_tray_name->GetTextCtrl()->GetValue().ToStdString(); } else e.Skip(); }); comboBox_tray_name->GetTextCtrl()->Bind(wxEVT_KILL_FOCUS, [this, result_failed, index, fcb, comboBox_tray_name](auto& e) { - this->m_calib_results[index].name = comboBox_tray_name->GetValue().ToStdString(); + this->m_calib_results[index].name = comboBox_tray_name->GetTextCtrl()->GetValue().ToStdString(); e.Skip(); }); } @@ -2982,8 +2984,10 @@ void FlowRateWizard::request_calib_result() { if (curr_obj->has_get_flow_ratio_result) { if (!has_get_result) { CalibUtils::get_flow_ratio_calib_results(m_calib_results); - if (m_calib_results.size() > 0) + if (m_calib_results.size() > 0) { has_get_result = true; + sync_save_page_data(); + } } } }