mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-03 05:40:36 +08:00
ConfigWizard: Fixed crashes on "Confirm configuration update"
This commit is contained in:
parent
d2d39db33a
commit
944e5f6d79
@ -718,8 +718,8 @@ void PagePrinters::unselect_all_presets()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(preset_bundle);
|
|
||||||
|
|
||||||
|
if (preset_bundle) {
|
||||||
auto unselect = [preset_bundle](const std::string& vendor_id, const std::string& model, const std::string& variant) {
|
auto unselect = [preset_bundle](const std::string& vendor_id, const std::string& model, const std::string& variant) {
|
||||||
for (auto& preset : preset_bundle->printers) {
|
for (auto& preset : preset_bundle->printers) {
|
||||||
if (preset.config.opt_string("printer_model") == model
|
if (preset.config.opt_string("printer_model") == model
|
||||||
@ -741,6 +741,7 @@ void PagePrinters::unselect_all_presets()
|
|||||||
unselect(picker->vendor_id, cb->model, cb->variant);
|
unselect(picker->vendor_id, cb->model, cb->variant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// remove vendor from appconfig_new
|
// remove vendor from appconfig_new
|
||||||
AppConfig* appconfig = &wizard_p()->appconfig_new;
|
AppConfig* appconfig = &wizard_p()->appconfig_new;
|
||||||
@ -3675,12 +3676,15 @@ void ConfigWizard::priv::load_pages_from_archive()
|
|||||||
any_fff_selected = !only_sla_mode && check_fff_selected();
|
any_fff_selected = !only_sla_mode && check_fff_selected();
|
||||||
|
|
||||||
update_materials(T_ANY);
|
update_materials(T_ANY);
|
||||||
if (!only_sla_mode)
|
if (!page_filaments && !only_sla_mode) {
|
||||||
add_page(page_filaments = new PageMaterials(q, &filaments,
|
add_page(page_filaments = new PageMaterials(q, &filaments,
|
||||||
_L("Filament Profiles Selection"), _L("Filaments"), _L("Type:")));
|
_L("Filament Profiles Selection"), _L("Filaments"), _L("Type:")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!page_sla_materials) {
|
||||||
add_page(page_sla_materials = new PageMaterials(q, &sla_materials,
|
add_page(page_sla_materials = new PageMaterials(q, &sla_materials,
|
||||||
_L("SLA Material Profiles Selection") + " ", _L("SLA Materials"), _L("Type:")));
|
_L("SLA Material Profiles Selection") + " ", _L("SLA Materials"), _L("Type:")));
|
||||||
|
}
|
||||||
|
|
||||||
load_pages();
|
load_pages();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user