From: Marko Luukkainen Date: Thu, 5 Dec 2019 13:09:58 +0000 (+0000) Subject: Merge "Refuse attempts to set turn radius index to a negative value." X-Git-Tag: v1.43.0~97 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=5f15c0dd0782bac783de4f2c1b44d8dcb6f4328d;hp=e9988b476c8634d67cae75c53a8d084f463d5419;p=simantics%2F3d.git Merge "Refuse attempts to set turn radius index to a negative value." --- diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java index 5c3a1e98..794c5329 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java @@ -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)