]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Outline view is able to show control points with debugging mode 64/3064/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Tue, 6 Aug 2019 09:40:35 +0000 (12:40 +0300)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Tue, 6 Aug 2019 09:40:35 +0000 (12:40 +0300)
gitlab #19

Change-Id: Ice5ba0c5a8d14c33fe8283e6d1d52cf3e09496da

org.simantics.plant3d/src/org/simantics/plant3d/editor/P3DContentOutlinePage.java
org.simantics.plant3d/src/org/simantics/plant3d/editor/P3DNodeMap.java

index c675b1112f5a3845633c5d6d9cd714d4e1155b39..160188e60c64c29303d8a7ecc9fd78d38e9388d7 100644 (file)
@@ -18,7 +18,6 @@ import org.simantics.g3d.vtk.common.VTKContentOutlinePage;
 import org.simantics.plant3d.Activator;
 import org.simantics.plant3d.scenegraph.EndComponent;
 import org.simantics.plant3d.scenegraph.Equipment;
-import org.simantics.plant3d.scenegraph.InlineComponent;
 import org.simantics.plant3d.scenegraph.Nozzle;
 import org.simantics.plant3d.scenegraph.P3DRootNode;
 import org.simantics.plant3d.scenegraph.PipeRun;
@@ -65,7 +64,13 @@ public class P3DContentOutlinePage extends VTKContentOutlinePage<Resource, Objec
                                        if (parentElement instanceof PipelineComponent) {
                                                return new Object[]{((PipelineComponent) parentElement).getControlPoint()};
                                        } else if (parentElement instanceof PipeControlPoint) {
-                                               return new Object[]{((PipeControlPoint) parentElement).getPipelineComponent()};
+                                               PipeControlPoint pcp = (PipeControlPoint) parentElement;
+                                               Object arr[] = new Object[pcp.children.size()+1];
+                                               arr[0] = pcp.getPipelineComponent();
+                                               for (int i = 0; i < pcp.children.size();i++) {
+                                                       arr[i+1] = pcp.children.get(i);
+                                               }
+                                               return arr;
                                        }
                                }
                                return super.getChildren(parentElement);
index b098951346a114f6b1566ee798a6c20d358d88b1..833cea3cbe77e9e044d93071be27c438a3244a7f 100644 (file)
@@ -7,7 +7,6 @@ import java.util.List;
 import java.util.Set;
 
 import org.simantics.db.ReadGraph;
-import org.simantics.db.Resource;
 import org.simantics.db.Session;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.g3d.ontology.G3D;