mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-06 22:47:32 -06:00
Fix AMS filament selection compatible check (#9126)
* Fix AMS filament selection compatible check (SoftFever/OrcaSlicer#9112)
This commit is contained in:
parent
c90b3a2cce
commit
035b047fef
1 changed files with 4 additions and 3 deletions
|
@ -992,10 +992,11 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
|
|||
auto filament_item = map_filament_items[m_comboBox_filament->GetValue().ToStdString()];
|
||||
std::string filament_id = filament_item.filament_id;
|
||||
if (it->filament_id.compare(filament_id) == 0) {
|
||||
ConfigOption * printer_opt = it->config.option("compatible_printers");
|
||||
ConfigOptionStrings *printer_strs = dynamic_cast<ConfigOptionStrings *>(printer_opt);
|
||||
bool has_compatible_printer = false;
|
||||
std::string preset_name = it->name;
|
||||
for (std::string printer_name : printer_names) {
|
||||
if (preset_name.find(printer_name) != std::string::npos) {
|
||||
for (auto printer_str : printer_strs->values) {
|
||||
if (printer_names.find(printer_str) != printer_names.end()) {
|
||||
has_compatible_printer = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue