]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Merge "Refuse attempts to set turn radius index to a negative value."
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Thu, 5 Dec 2019 13:09:58 +0000 (13:09 +0000)
committerGerrit Code Review <gerrit2@simantics>
Thu, 5 Dec 2019 13:09:58 +0000 (13:09 +0000)
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)