]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java
Adding a component next to a reducer used wrong PipeRun
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / utils / ComponentUtils.java
index 15ee7918ca1709501eab1bc076054a1459df479f..58b9f1e0cf61cd1c4a8098c9da8780f42c279b78 100644 (file)
@@ -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();