]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Add check for presence of pipe runs when updating offset 67/4067/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Mon, 6 Apr 2020 07:58:15 +0000 (10:58 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 6 Apr 2020 08:08:41 +0000 (08:08 +0000)
gitlab #113

Change-Id: I300758575e0fac2181090fdc6afc276f1ab630a1
(cherry picked from commit b9ff739acde448aef799b8cb41861bb68f0b6bf6)

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

index 695f1fa698e040b657655e8ddf67b62b687695d5..966bb42187266b853af082f8b35da4ac04f6b458 100644 (file)
@@ -174,7 +174,8 @@ public class InlineComponent extends PipelineComponent {
                                        map.put("radius2", pipeRun2.getPipeDiameter() * 0.5);
                                }
                                if (controlPoint.isOffset() && !componentCalculatedOffset) {
-                                       updateOffset();
+                                       if (getPipeRun() != null && getAlternativePipeRun() != null)
+                                               updateOffset();
                                        map.put("offset", controlPoint.getOffset());
                                }
                        }