backward compatible fix

This commit is contained in:
bancika
2016-12-21 17:16:49 +01:00
parent 65a6e30986
commit a32105e156
@@ -160,6 +160,9 @@ public abstract class AbstractTubeSymbol extends AbstractComponent<String> {
@EditableProperty
public Orientation getOrientation() {
if (orientation == null)
orientation = Orientation.DEFAULT;
return orientation;
}
@@ -175,11 +178,11 @@ public abstract class AbstractTubeSymbol extends AbstractComponent<String> {
body = null;
getBody();
if (this.orientation == Orientation.DEFAULT)
if (getOrientation() == Orientation.DEFAULT)
return;
Point first = this.controlPoints[0];
double angle = Double.parseDouble(this.orientation.name().replace("_", ""));
double angle = Double.parseDouble(getOrientation().name().replace("_", ""));
AffineTransform rotate = AffineTransform.getRotateInstance(Math.toRadians(angle), first.x, first.y);
for (int i = 1; i < this.controlPoints.length; i++) {
rotate.transform(this.controlPoints[i], this.controlPoints[i]);