From 7a6193c2806c1755ad127eb479e871b2008df856 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Fri, 1 Nov 2019 17:50:32 +0200 Subject: [PATCH] Turn index validation prevents model loading gitlab #43 Change-Id: Id4b63712dce331dc35efb7952a89874669a574d0 --- .../src/org/simantics/plant3d/scenegraph/TurnComponent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 e25fd8d4..0e307a47 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java @@ -103,7 +103,7 @@ public class TurnComponent extends PipelineComponent { return getControlPoint().getTurnAxis(); } - @GetPropertyValue(name="Turn Radius", value=Plant3D.URIs.HasTurnRadius, tabId = "Default") + @GetPropertyValue(name="Turn Radius", value="TurnRadius", tabId = "Default") public Double getTurnRadius() { if (turnRadiusIndex != null) return getPipeRun().getTurnRadiusArray()[turnRadiusIndex]; @@ -128,7 +128,7 @@ public class TurnComponent extends PipelineComponent { return; if (turnRadiusIndex == null) return; - if (turnRadiusIndex != null) { + if (turnRadiusIndex != null && getPipeRun() != null) { if (getPipeRun().getTurnRadiusArray().length <= turnRadiusIndex) return; } -- 2.47.1