From: Reino Ruusu Date: Thu, 5 Dec 2019 11:52:38 +0000 (+0200) Subject: Refuse attempts to set turn radius index to a negative value. X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F3683%2F1;p=simantics%2F3d.git Refuse attempts to set turn radius index to a negative value. gitlab #63 Change-Id: I98564e31efb7ba483c7b5dd4a3988098889bb134 (cherry picked from commit d7f763511294343dca804fc5909a41fff39db91c) --- 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)