mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Fix of 2.3 rc1 can't load its own 3mf files (if they contain custom gcode) #5550
The issue was handling of the special "default_filament_profile" vector, which is not being normalized in length to the number of extruders, as this vector is being shown to the user at the Printer dependencies page, and we don't want to present empty fields there, if the default filament profile was not defined in the system preset.
This commit is contained in:
@@ -86,9 +86,8 @@ PresetBundle::PresetBundle() :
|
||||
preset.config.optptr(key, true);
|
||||
if (i == 0) {
|
||||
preset.config.optptr("default_print_profile", true);
|
||||
preset.config.option<ConfigOptionStrings>("default_filament_profile", true)->values = { "" };
|
||||
}
|
||||
else {
|
||||
preset.config.option<ConfigOptionStrings>("default_filament_profile", true);
|
||||
} else {
|
||||
preset.config.optptr("default_sla_print_profile", true);
|
||||
preset.config.optptr("default_sla_material_profile", true);
|
||||
}
|
||||
@@ -752,7 +751,7 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool
|
||||
switch (printer_technology) {
|
||||
case ptFFF:
|
||||
config.option<ConfigOptionString>("default_print_profile", true);
|
||||
config.option<ConfigOptionStrings>("default_filament_profile", true)->values.resize(num_extruders, std::string());
|
||||
config.option<ConfigOptionStrings>("default_filament_profile", true);
|
||||
break;
|
||||
case ptSLA:
|
||||
config.option<ConfigOptionString>("default_sla_print_profile", true);
|
||||
|
||||
Reference in New Issue
Block a user