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

Change-Id: I98564e31efb7ba483c7b5dd4a3988098889bb134
(cherry picked from commit d7f763511294343dca804fc5909a41fff39db91c)

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)