diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 3972b20d2..f0bf93a55 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1316,6 +1316,8 @@ std::string PresetCollection::section_name() const } } +// Used for validating the "inherits" flag when importing user's config bundles. +// Returns names of all system presets including the former names of these presets. std::vector PresetCollection::system_preset_names() const { size_t num = 0; @@ -1325,8 +1327,10 @@ std::vector PresetCollection::system_preset_names() const std::vector out; out.reserve(num); for (const Preset &preset : m_presets) - if (preset.is_system) + if (preset.is_system) { out.emplace_back(preset.name); + out.insert(out.end(), preset.renamed_from.begin(), preset.renamed_from.end()); + } std::sort(out.begin(), out.end()); return out; } diff --git a/src/libslic3r/Preset.hpp b/src/libslic3r/Preset.hpp index c54dd3fd8..1bf6b94af 100644 --- a/src/libslic3r/Preset.hpp +++ b/src/libslic3r/Preset.hpp @@ -441,6 +441,8 @@ public: { return dirty_options(&this->get_edited_preset(), this->get_selected_preset_parent(), deep_compare); } // Return a sorted list of system preset names. + // Used for validating the "inherits" flag when importing user's config bundles. + // Returns names of all system presets including the former names of these presets. std::vector system_preset_names() const; // Update a dirty flag of the current preset