Fixed an error when importing / exporting Config Bundles with

at least one SLA print or SLA material defined.
This commit is contained in:
bubnikv 2019-02-03 20:17:55 +01:00
parent 1905d49ade
commit bcab373a54
3 changed files with 17 additions and 2 deletions

View file

@ -1208,7 +1208,7 @@ size_t PresetBundle::load_configbundle(const std::string &path, unsigned int fla
#else
// Store the print/filament/printer presets at the same location as the upstream Slic3r.
#endif
/ presets->name() / file_name).make_preferred();
/ presets->section_name() / file_name).make_preferred();
// Load the preset into the list of presets, save it to disk.
Preset &loaded = presets->load_preset(file_path.string(), preset_name, std::move(config), false);
if (flags & LOAD_CFGBNDLE_SAVE)
@ -1365,7 +1365,7 @@ void PresetBundle::export_configbundle(const std::string &path, bool export_syst
if (preset.is_default || preset.is_external || (preset.is_system && ! export_system_settings))
// Only export the common presets, not external files or the default preset.
continue;
c << std::endl << "[" << presets->name() << ":" << preset.name << "]" << std::endl;
c << std::endl << "[" << presets->section_name() << ":" << preset.name << "]" << std::endl;
for (const std::string &opt_key : preset.config.keys())
c << opt_key << " = " << preset.config.serialize(opt_key) << std::endl;
}