Fix of #7169 Check if material or filament profile is_compatible before selecting it when it should be selected as first selected profile in wizard.
This commit is contained in:
parent
d25d572b36
commit
a771519b9f
@ -556,13 +556,15 @@ void PresetBundle::load_selections(AppConfig &config, const PresetPreferences& p
|
|||||||
auto printer_technology = printers.get_selected_preset().printer_technology();
|
auto printer_technology = printers.get_selected_preset().printer_technology();
|
||||||
if (printer_technology == ptFFF && ! preferred_selection.filament.empty()) {
|
if (printer_technology == ptFFF && ! preferred_selection.filament.empty()) {
|
||||||
std::string preferred_preset_name = get_preset_name_by_alias(Preset::Type::TYPE_FILAMENT, preferred_selection.filament);
|
std::string preferred_preset_name = get_preset_name_by_alias(Preset::Type::TYPE_FILAMENT, preferred_selection.filament);
|
||||||
if (auto it = filaments.find_preset_internal(preferred_preset_name); it != filaments.end() && it->is_visible) {
|
if (auto it = filaments.find_preset_internal(preferred_preset_name);
|
||||||
|
it != filaments.end() && it->is_visible && it->is_compatible) {
|
||||||
filaments.select_preset_by_name_strict(preferred_preset_name);
|
filaments.select_preset_by_name_strict(preferred_preset_name);
|
||||||
this->filament_presets.front() = filaments.get_selected_preset_name();
|
this->filament_presets.front() = filaments.get_selected_preset_name();
|
||||||
}
|
}
|
||||||
} else if (printer_technology == ptSLA && ! preferred_selection.sla_material.empty()) {
|
} else if (printer_technology == ptSLA && ! preferred_selection.sla_material.empty()) {
|
||||||
std::string preferred_preset_name = get_preset_name_by_alias(Preset::Type::TYPE_SLA_MATERIAL, preferred_selection.sla_material);
|
std::string preferred_preset_name = get_preset_name_by_alias(Preset::Type::TYPE_SLA_MATERIAL, preferred_selection.sla_material);
|
||||||
if (auto it = sla_materials.find_preset_internal(preferred_preset_name); it != sla_materials.end() && it->is_visible)
|
if (auto it = sla_materials.find_preset_internal(preferred_preset_name);
|
||||||
|
it != sla_materials.end() && it->is_visible && it->is_compatible)
|
||||||
sla_materials.select_preset_by_name_strict(preferred_preset_name);
|
sla_materials.select_preset_by_name_strict(preferred_preset_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user