[#1375] Fix preset not "resetting" nose cone / transition shape parameter

This commit is contained in:
SiboVG 2022-05-25 16:54:32 +02:00
parent 586b85e536
commit a526b18626

View File

@ -257,7 +257,7 @@ public class Transition extends SymmetricComponent implements InsideColorCompone
if (type == null) {
throw new IllegalArgumentException("setType called with null argument");
}
if (this.type == type)
if ((this.type == type) && (this.clipped == type.isClippable()) && (this.shapeParameter == type.defaultParameter()))
return;
this.type = type;
this.clipped = type.isClippable();
@ -284,7 +284,7 @@ public class Transition extends SymmetricComponent implements InsideColorCompone
return;
this.shapeParameter = MathUtil.clamp(n, type.minParameter(), type.maxParameter());
// Need to clearPreset when shape type changes.
// Need to clearPreset when shape parameter changes.
clearPreset();
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);