]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/editor/P3DContentOutlinePage.java
Allow adding adjustable length components in the middle of a pipe
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / editor / P3DContentOutlinePage.java
index a4e8bafd14b3d777ebaaa0e69b790d1408c85d0f..893a07300cd2c95db095123c3794e7dbfdf53a54 100644 (file)
@@ -19,6 +19,7 @@ import org.simantics.g3d.scenegraph.base.ParentNode;
 import org.simantics.g3d.vtk.common.NodeSelectionProvider2;
 import org.simantics.g3d.vtk.common.VTKContentOutlinePage;
 import org.simantics.plant3d.Activator;
+import org.simantics.plant3d.ontology.Plant3D;
 import org.simantics.plant3d.scenegraph.EndComponent;
 import org.simantics.plant3d.scenegraph.Equipment;
 import org.simantics.plant3d.scenegraph.Nozzle;
@@ -30,7 +31,7 @@ import org.simantics.plant3d.scenegraph.controlpoint.PipeControlPoint;
 
 public class P3DContentOutlinePage extends VTKContentOutlinePage<Resource, INode>{
        
-       private static final boolean DEBUG = true;
+       private static final boolean DEBUG = false;
        protected Menu contextMenu;
        
        private LocalResourceManager manager = new LocalResourceManager(JFaceResources.getResources());
@@ -117,6 +118,18 @@ public class P3DContentOutlinePage extends VTKContentOutlinePage<Resource, INode
                
        }
        
+       @Override
+       public void propertyChanged(INode node, String id) {
+           // TODO Auto-generated method stub
+           if (node instanceof PipelineComponent) {
+               if (Plant3D.URIs.HasNext.equals(id) || Plant3D.URIs.HasPrevious.equals(id)) {
+                   refershViewer(node.getParent());
+                   return;
+               }
+           }
+           super.propertyChanged(node, id);
+       }
+       
        @Override
        public void dispose() {
                manager.dispose();