[#1815] Don't let preset loading override component name on file import
This commit is contained in:
parent
bb47a5eca2
commit
a6ae9a47c7
@ -68,7 +68,10 @@ class ComponentPresetSetter implements Setter {
|
|||||||
if (digest != null && !matchingPreset.getDigest().equals(digest)) {
|
if (digest != null && !matchingPreset.getDigest().equals(digest)) {
|
||||||
warnings.add(Warning.fromString("ComponentPreset for component " + c.getName() + " has wrong digest"));
|
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);
|
setMethod.invoke(c, matchingPreset);
|
||||||
|
c.setName(componentName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user