From 5294a48ee8bdbf808ed4b9570778657b3c2e15ab Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Tue, 19 Jan 2021 09:58:06 +0100 Subject: [PATCH] Fix of prusa 2.3.0 crash with 0.25 nozzle #5825 Importing a config bundle as a config file was broken for multi material FDM printers, where a different filament was active for each extruder. --- src/libslic3r/PresetBundle.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/PresetBundle.cpp b/src/libslic3r/PresetBundle.cpp index b31ee666445..b57ff0e14ee 100644 --- a/src/libslic3r/PresetBundle.cpp +++ b/src/libslic3r/PresetBundle.cpp @@ -928,7 +928,11 @@ void PresetBundle::load_config_file_config_bundle(const std::string &path, const if (opt_compatible->type() == coStrings) static_cast(opt_compatible)->values.clear(); } - collection_dst.load_preset(path, preset_name_dst, std::move(preset_src->config), activate).is_external = true; + (collection_dst.type() == Preset::TYPE_FILAMENT ? + collection_dst.load_preset(path, preset_name_dst, preset_src->config, activate) : + // Only move the source config for non filament profiles, as single filament profile may be referenced multiple times. + collection_dst.load_preset(path, preset_name_dst, std::move(preset_src->config), activate)) + .is_external = true; return preset_name_dst; }; load_one(this->prints, tmp_bundle.prints, tmp_bundle.prints .get_selected_preset_name(), true);