Fix for #11991 - Filament selections do not appear on custom printer

(SPE-2094)
This commit is contained in:
YuSanka 2024-02-05 16:09:15 +01:00 committed by Lukas Matena
parent 69808c3b12
commit 78f4a6febb

View File

@ -2790,8 +2790,11 @@ bool ConfigWizard::priv::on_bnt_finish()
if (page_sla_materials)
page_sla_materials->check_and_update_presets();
// there's no need to check that filament is selected if we have only custom printer
if (custom_printer_selected && !any_fff_selected && !any_sla_selected) return true;
// Even if we have only custom printer installed, check filament selection.
// Template filaments could be selected in this case.
if (custom_printer_selected && !any_fff_selected && !any_sla_selected)
return check_and_install_missing_materials(T_FFF);
// check, that there is selected at least one filament/material
return check_and_install_missing_materials(T_ANY);
}
@ -2899,7 +2902,7 @@ bool ConfigWizard::priv::check_and_install_missing_materials(Technology technolo
bool no_templates = wxGetApp().app_config->get("no_templates") == "1";
if (any_fff_selected && (technology & T_FFF)) {
if ((any_fff_selected || custom_printer_selected) && (technology & T_FFF)) {
std::set<const VendorProfile::PrinterModel*> printer_models_without_material = printer_models_missing_materials(ptFFF, AppConfig::SECTION_FILAMENTS, no_templates);
if (! printer_models_without_material.empty()) {
if (only_for_model_id.empty())