From 2004e769cedc01364f36a1542849c8030d3d1a96 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Mon, 17 Feb 2025 16:35:54 +0800 Subject: [PATCH] FIX: modify the message of cali jira: none Change-Id: Ibc2dfa0588a02508cc625eedb3da38d0eae2199c --- src/slic3r/Utils/CalibUtils.cpp | 37 ++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/slic3r/Utils/CalibUtils.cpp b/src/slic3r/Utils/CalibUtils.cpp index 4c011934f..b6225ab71 100644 --- a/src/slic3r/Utils/CalibUtils.cpp +++ b/src/slic3r/Utils/CalibUtils.cpp @@ -1158,27 +1158,29 @@ bool CalibUtils::check_printable_status_before_cali(const MachineObject *obj, co } for (const auto &cali_info : cali_infos.calib_datas) { + wxString name = _L("left"); + if (cali_info.extruder_id == 0) { + name = _L("right"); + } + if (!is_approx(cali_info.nozzle_diameter, diameter)) { - error_message = _L("The selected filament's nozzle diameter or type does not match the actual printer configuration.\n" + if (is_multi_extruder) + error_message = wxString::Format(_L("The currently selected nozzle diameter of %s extruder does not match the actual nozzle diameter.\n" + "Please click the Sync button above and restart the calibration."), name); + else + error_message = _L("The nozzle diameter does not match the actual printer nozzle diameter.\n" "Please click the Sync button above and restart the calibration."); return false; } if (is_multi_extruder) { if (nozzle_volume_types[cali_info.extruder_id] == NozzleFlowType::NONE_FLOWTYPE) { - wxString name = _L("left"); - if (cali_info.extruder_id == 0) { - name = _L("right"); - } + error_message = wxString::Format(_L("Printer %s nozzle information has not been set. Please configure it before proceeding with the calibration."), name); return false; } if (NozzleVolumeType(nozzle_volume_types[cali_info.extruder_id] - 1) != cali_info.nozzle_volume_type) { - wxString name = _L("left"); - if (cali_info.extruder_id == 0) { - name = _L("right"); - } error_message = wxString::Format(_L("The currently selected nozzle type of %s extruder does not match the actual printer nozzle type.\n" "Please click the Sync button above and restart the calibration."), name); return false; @@ -1207,23 +1209,28 @@ bool CalibUtils::check_printable_status_before_cali(const MachineObject* obj, co } } + wxString name = _L("left"); + if (cali_info.extruder_id == 0) { + name = _L("right"); + } + if (!is_approx(nozzle_diameter, diameter)) { - error_message = _L("The selected filament's nozzle diameter or type does not match the actual printer configuration.\n" - "Please click the Sync button above and restart the calibration."); + if (is_multi_extruder) + error_message = wxString::Format(_L("The currently selected nozzle diameter of %s extruder does not match the actual nozzle diameter.\n" + "Please click the Sync button above and restart the calibration."), name); + else + error_message = _L("The nozzle diameter does not match the actual printer nozzle diameter.\n" + "Please click the Sync button above and restart the calibration."); return false; } if (is_multi_extruder) { if (nozzle_volume_types[cali_info.extruder_id] == NozzleFlowType::NONE_FLOWTYPE) { - wxString name = _L("left"); - if (cali_info.extruder_id == 0) { name = _L("right"); } error_message = wxString::Format(_L("Printer %s nozzle information has not been set. Please configure it before proceeding with the calibration."), name); return false; } if (NozzleVolumeType(nozzle_volume_types[cali_info.extruder_id] - 1) != cali_info.nozzle_volume_type) { - wxString name = _L("left"); - if (cali_info.extruder_id == 0) { name = _L("right"); } error_message = wxString::Format(_L("The currently selected nozzle type of %s extruder does not match the actual printer nozzle type.\n" "Please click the Sync button above and restart the calibration."), name); return false;