fix: old preset names should resolved renamed_from field (#14429)

* fix: old preset names should resolved renamed_from field

* chore: remove misleading comments

* Merge branch 'main' into fix/consider_renamed_from

* normalize_inherits

* improve find_preset2 performace
This commit is contained in:
Ian Chua
2026-06-27 22:15:43 +08:00
committed by SoftFever
parent 66d4850399
commit 2a1fdcc0b9
5 changed files with 214 additions and 28 deletions

View File

@@ -1876,12 +1876,6 @@ void ConfigWizard::priv::load_vendors()
for (auto &bundle : bundles) {
const PresetCollection &materials = bundle.second.preset_bundle->materials(technology);
const Preset *preset = materials.find_preset(material_name);
if (preset == nullptr) {
// Not found. Maybe the material preset is there, bu it was was renamed?
const std::string *new_name = materials.get_preset_name_renamed(material_name);
if (new_name != nullptr)
preset = materials.find_preset(*new_name);
}
if (preset != nullptr) {
// Materal preset was found, mark it as installed.
section_new[preset->name] = "true";