]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Refuse attempts to set turn radius index to a negative value. 76/3676/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Thu, 5 Dec 2019 11:52:38 +0000 (13:52 +0200)
committerReino Ruusu <reino.ruusu@semantum.fi>
Thu, 5 Dec 2019 11:58:32 +0000 (13:58 +0200)
gitlab #63

Change-Id: I98564e31efb7ba483c7b5dd4a3988098889bb134

org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java

index 5c3a1e981ee16fd1bd07674b62df1e8b8a9aef95..794c53294a0197210674e6bb416aefa5b70401e2 100644 (file)
@@ -140,7 +140,7 @@ public class TurnComponent extends PipelineComponent {
     public void setTurnRadiusIndex(Integer turnRadiusIndex) {
            if (this.turnRadiusIndex == turnRadiusIndex)
                return;
-           if (turnRadiusIndex == null)
+           if (turnRadiusIndex == null || turnRadiusIndex < 0)
                return;
            if (turnRadiusIndex != null && getPipeRun() != null) {
                if (getPipeRun().getTurnRadiusArray().length <= turnRadiusIndex)