From aa5573e8b9f9fa06652714ad542c0250e4f73970 Mon Sep 17 00:00:00 2001 From: Merill Date: Thu, 25 Jan 2024 12:02:27 +0100 Subject: [PATCH] fix remove_invalid_keys on an erased config instead of the preset config (PR #12127 from @supermerill, SPE-2127): see supermerill/SuperSlicer/issues/4079 --- src/libslic3r/Preset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index f5e1aa7036..8be5a3f45f 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -749,7 +749,7 @@ void PresetCollection::load_presets( preset.config.apply(std::move(config)); Preset::normalize(preset.config); // Report configuration fields, which are misplaced into a wrong group. - std::string incorrect_keys = Preset::remove_invalid_keys(config, default_preset.config); + std::string incorrect_keys = Preset::remove_invalid_keys(preset.config, default_preset.config); if (! incorrect_keys.empty()) BOOST_LOG_TRIVIAL(error) << "Error in a preset file: The preset \"" << preset.file << "\" contains the following incorrect keys: " << incorrect_keys << ", which were removed";