From: Marko Luukkainen Date: Thu, 29 Aug 2019 15:50:11 +0000 (+0300) Subject: Adding a component next to a reducer used wrong PipeRun X-Git-Tag: v1.43.0~199 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=ebbeda2e4e110045d29dd9d05b840e5890a5eb35;p=simantics%2F3d.git Adding a component next to a reducer used wrong PipeRun gitlab #12 Change-Id: I8164d704011761f35d004506dba9462c24c7272f --- diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java b/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java index 15ee7918..58b9f1e0 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java @@ -336,13 +336,18 @@ public class ComponentUtils { if (toPcp.isInline()) { switch (position) { case NEXT: - if (toPcp.isDualInline()) + if (toPcp.isDualInline()) { toPcp = toPcp.getSubPoint().get(0); + pipeRun = toPcp.getPipeRun(); + } break; case PREVIOUS: - if (toPcp.isDualSub()) + if (toPcp.isDualSub()) { toPcp = toPcp.parent; + pipeRun = toPcp.getPipeRun(); + } + break; } Vector3d start = new Vector3d(); Vector3d end = new Vector3d();