]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/editor/Plant3DEditor.java
Fix directed path leg update failing to update inline lengths
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / editor / Plant3DEditor.java
index 4059d938f0d939f754dd0204190cf1452703d487..a97be312f5e3605947f3a45a80c2c2a735bce984 100644 (file)
@@ -179,7 +179,7 @@ public class Plant3DEditor extends ResourceEditorPart {
                                
                                @Override
                                public void run(ReadGraph graph) throws DatabaseException {
-                                   System.out.println("START PLANT3D LOAD");
+                                   //System.out.println("START PLANT3D LOAD");
                                        PipingRules.setEnabled(false);
                                        IMappingSchema<Resource,INode> schema = getSchema(graph);
                                        mapping = Mappings.createWithListening(schema);
@@ -195,7 +195,7 @@ public class Plant3DEditor extends ResourceEditorPart {
                         throw new DatabaseException(e);
                     }
                                        
-                                       System.out.println("END PLANT3D LOAD");
+                                       //System.out.println("END PLANT3D LOAD");
                                }
                        });
                        
@@ -293,6 +293,7 @@ public class Plant3DEditor extends ResourceEditorPart {
                             if (nodeMap.isRangeModified());
                                 nodeMap.commit("Load sync");
                         } catch (Exception e) {
+                            ExceptionUtils.logAndShowError("Failed to load model correctly", e);
                             //throw new DatabaseException(e);
                         }
                         panel.removeListener(this);  
@@ -418,9 +419,10 @@ public class Plant3DEditor extends ResourceEditorPart {
                }
                try {
                        if (selected.size() == 0) {
-                               for (Item eq : P3DUtil.getEquipments(getLibraryUri())) {
-                                       m.add(new AddEquipmentAction(rootNode, eq));
-                               }
+                           m.add(new AddEquipmentAction(rootNode, getLibraryUri()));
+//                             for (Item eq : P3DUtil.getEquipments(getLibraryUri())) {
+//                                     m.add(new AddEquipmentAction(rootNode, eq));
+//                             }
                        } else if (selected.size() == 1) {
                                IP3DNode node = (IP3DNode)selected.get(0);
                                if (node instanceof Equipment) {