]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/editor/Plant3DEditor.java
SCL bindings to some G3D and Plant3D Java classes
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / editor / Plant3DEditor.java
index 159a239d9ff649eb772517f2f2acaa220b16a23e..21b99bfb74f109b5b910e5d86c19bdf8deda9531 100644 (file)
@@ -158,39 +158,8 @@ public class Plant3DEditor extends ResourceEditorPart {
                                        // update control points.
                                        // TODO : this should be optimized.
                                        try {
-                                               for (INode node : rootNode.getChild()) {
-                                                       if (node instanceof PipeRun) {
-                                                               for (PipelineComponent pc : ((PipeRun) node).getChild())
-                                                                       pc.sync();
-                                                       } else if (node instanceof Equipment) {
-                                                               for (PipelineComponent pc : ((Equipment) node).getChild())
-                                                                       pc.sync();
-                                                       }
-                                               }
-                                               
-                                               for (INode node : rootNode.getChild()) {
-                                                       if (node instanceof PipeRun) {
-                                                               for (PipelineComponent pc : ((PipeRun) node).getChild())
-                                                                       pc.sync2();
-                                                       } else if (node instanceof Equipment) {
-                                                               for (PipelineComponent pc : ((Equipment) node).getChild())
-                                                                       pc.sync2();
-                                                       }
-                                               }
-                                               for (INode node : rootNode.getChild()) {
-                                                       if (node instanceof PipeRun) {
-                                                               PipingRules.validate((PipeRun)node);
-                                                       }
-                                               }
-                                               PipingRules.setEnabled(true);
-                                               for (INode node : rootNode.getChild()) {
-                                                       if (node instanceof PipeRun) {
-                                                               PipeRun run = (PipeRun)node;
-                                                               for (PipeControlPoint pcp : run.getControlPoints())
-                                                                       PipingRules.positionUpdate(pcp);
-                                                                       
-                                                       }
-                                               }
+                                           P3DUtil.finalizeDBLoad(rootNode);
+                                           
                                        } catch (Exception e) {
                                                throw new DatabaseException(e);
                                        }