From 181316374321822da231612cc7e87f77395a20ac Mon Sep 17 00:00:00 2001 From: "xin.zhang" Date: Sat, 11 Jan 2025 11:32:41 +0800 Subject: [PATCH] FIX: can not send print since the param fault jira: [STUDIO-9724] Change-Id: I1e8870e6e0b182ed6c026784b169cfcf56c56e4c --- src/slic3r/GUI/SelectMachine.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index dffeb4b37..57aac5bb5 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -2105,6 +2105,7 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event) //check blacklist for (auto i = 0; i < m_ams_mapping_result.size(); i++) { + const auto& ams_id = m_ams_mapping_result[i].ams_id; auto tid = m_ams_mapping_result[i].tray_id; std::string filament_type = boost::to_upper_copy(m_ams_mapping_result[i].type); @@ -2119,7 +2120,8 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event) bool in_blacklist = false; std::string action; std::string info; - DeviceManager::check_filaments_in_blacklist(filament_brand, filament_type, tid, in_blacklist, action, info); + + DeviceManager::check_filaments_in_blacklist(filament_brand, filament_type, stoi(ams_id), in_blacklist, action, info); if (in_blacklist && action == "warning") { wxString prohibited_error = wxString::FromUTF8(info); @@ -2170,6 +2172,7 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event) for (auto i = 0; i < m_ams_mapping_result.size(); i++) { + const auto& ams_id = m_ams_mapping_result[i].ams_id; auto tid = m_ams_mapping_result[i].tray_id; std::string filament_type = boost::to_upper_copy(m_ams_mapping_result[i].type); @@ -2184,7 +2187,7 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event) bool in_blacklist = false; std::string action; std::string info; - DeviceManager::check_filaments_in_blacklist(filament_brand, filament_type, tid, in_blacklist, action, info); + DeviceManager::check_filaments_in_blacklist(filament_brand, filament_type, stoi(ams_id), in_blacklist, action, info); if (in_blacklist && action == "prohibition") { has_prohibited_filament = true;