]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Turn index validation prevents model loading 42/3442/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 1 Nov 2019 15:50:32 +0000 (17:50 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 1 Nov 2019 15:50:32 +0000 (17:50 +0200)
gitlab #43

Change-Id: Id4b63712dce331dc35efb7952a89874669a574d0

org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/TurnComponent.java

index e25fd8d4ad206fbb2faae13cf9cc8a301af27676..0e307a471eba496fbe1c93d5727b56cee1b5d4e8 100644 (file)
@@ -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;
            }