Merge pull request #1377 from SiboVG/issue-1375
[#1375] Fix preset not "resetting" nose cone / transition shape parameter
This commit is contained in:
commit
c4ffc663bf
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user