mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH:fixed incorrect prompt for glow material
jira:[STUDIO-10574] Change-Id: I4475eb527ffbc8cc6d72405445552971d062b45e (cherry picked from commit 01918affdfb69879f86ca47fe2f1ab8af5e1311b)
This commit is contained in:
@@ -2141,29 +2141,25 @@ 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].get_amd_id();
|
||||
const auto& ams_id = m_ams_mapping_result[i].get_ams_id();
|
||||
const auto& slot_id = m_ams_mapping_result[i].get_slot_id();
|
||||
|
||||
auto tid = m_ams_mapping_result[i].tray_id;
|
||||
|
||||
std::string filament_type = boost::to_upper_copy(m_ams_mapping_result[i].type);
|
||||
std::string filament_brand;
|
||||
std::string filament_id;
|
||||
|
||||
for (auto fs : m_filaments) {
|
||||
if (fs.id == m_ams_mapping_result[i].id) {
|
||||
filament_brand = m_filaments[i].brand;
|
||||
filament_id = m_filaments[i].filament_id;
|
||||
}
|
||||
}
|
||||
|
||||
PresetBundle *preset_bundle = GUI::wxGetApp().preset_bundle;
|
||||
auto option = preset_bundle->get_filament_by_filament_id(filament_id);
|
||||
auto tag_name = option ? option->filament_name : "";
|
||||
|
||||
bool in_blacklist = false;
|
||||
std::string action;
|
||||
std::string info;
|
||||
|
||||
DeviceManager::check_filaments_in_blacklist(filament_brand, filament_type, tag_name, ams_id, in_blacklist, action, info);
|
||||
DeviceManager::check_filaments_in_blacklist(filament_brand, filament_type, ams_id, slot_id, in_blacklist, action, info);
|
||||
|
||||
if (in_blacklist && action == "warning") {
|
||||
wxString prohibited_error = wxString::FromUTF8(info);
|
||||
@@ -2222,7 +2218,9 @@ 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].get_amd_id();
|
||||
const auto& ams_id = m_ams_mapping_result[i].get_ams_id();
|
||||
const auto& slot_id = m_ams_mapping_result[i].get_slot_id();
|
||||
|
||||
auto tid = m_ams_mapping_result[i].tray_id;
|
||||
|
||||
std::string filament_type = boost::to_upper_copy(m_ams_mapping_result[i].type);
|
||||
@@ -2236,14 +2234,10 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
|
||||
}
|
||||
}
|
||||
|
||||
PresetBundle *preset_bundle = GUI::wxGetApp().preset_bundle;
|
||||
auto option = preset_bundle->get_filament_by_filament_id(filament_id);
|
||||
auto tag_name = option ? option->filament_name : "";
|
||||
|
||||
bool in_blacklist = false;
|
||||
std::string action;
|
||||
std::string info;
|
||||
DeviceManager::check_filaments_in_blacklist(filament_brand, filament_type, tag_name, ams_id, in_blacklist, action, info);
|
||||
DeviceManager::check_filaments_in_blacklist(filament_brand, filament_type, ams_id, slot_id, in_blacklist, action, info);
|
||||
|
||||
if (in_blacklist && action == "prohibition") {
|
||||
has_prohibited_filament = true;
|
||||
|
||||
Reference in New Issue
Block a user