Clear Transition preset on shape and type change
This commit is contained in:
parent
9776a17ff3
commit
c895dde4a3
@ -262,6 +262,10 @@ public class Transition extends SymmetricComponent implements InsideColorCompone
|
|||||||
this.type = type;
|
this.type = type;
|
||||||
this.clipped = type.isClippable();
|
this.clipped = type.isClippable();
|
||||||
this.shapeParameter = type.defaultParameter();
|
this.shapeParameter = type.defaultParameter();
|
||||||
|
|
||||||
|
// Need to clearPreset when shape type changes.
|
||||||
|
clearPreset();
|
||||||
|
|
||||||
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,6 +283,10 @@ public class Transition extends SymmetricComponent implements InsideColorCompone
|
|||||||
if (shapeParameter == n)
|
if (shapeParameter == n)
|
||||||
return;
|
return;
|
||||||
this.shapeParameter = MathUtil.clamp(n, type.minParameter(), type.maxParameter());
|
this.shapeParameter = MathUtil.clamp(n, type.minParameter(), type.maxParameter());
|
||||||
|
|
||||||
|
// Need to clearPreset when shape type changes.
|
||||||
|
clearPreset();
|
||||||
|
|
||||||
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user