From 9d18c12daa158011aac540d9c07489bb09796a1c Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Mon, 6 Apr 2020 10:58:15 +0300 Subject: [PATCH] Add check for presence of pipe runs when updating offset gitlab #113 Change-Id: I300758575e0fac2181090fdc6afc276f1ab630a1 (cherry picked from commit b9ff739acde448aef799b8cb41861bb68f0b6bf6) --- .../src/org/simantics/plant3d/scenegraph/InlineComponent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()); } } -- 2.47.1