From: Reino Ruusu Date: Mon, 6 Apr 2020 07:58:15 +0000 (+0300) Subject: Add check for presence of pipe runs when updating offset X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F4067%2F1;p=simantics%2F3d.git Add check for presence of pipe runs when updating offset gitlab #113 Change-Id: I300758575e0fac2181090fdc6afc276f1ab630a1 (cherry picked from commit b9ff739acde448aef799b8cb41861bb68f0b6bf6) --- diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/InlineComponent.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/InlineComponent.java index 695f1fa6..966bb421 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/InlineComponent.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/InlineComponent.java @@ -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()); } }