Merge pull request #1816 from SiboVG/issue-1815

[#1815] Don't let preset loading override component name on file import
This commit is contained in:
Sibo Van Gool 2022-11-15 11:55:07 +01:00 committed by GitHub
commit 3618daa2a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,9 @@ class ComponentPresetSetter implements Setter {
warnings.add(Warning.fromString("ComponentPreset for component " + c.getName() + " has wrong digest"));
}
// The preset loader can override the component name, so first store it and then apply it again
String componentName = c.getName();
setMethod.invoke(c, matchingPreset);
c.setName(componentName);
}
}