]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/utils/P3DUtil.java
Fix handling offset in dual directed path leg updates
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / utils / P3DUtil.java
index 055ffa11df29a5f388b9eea4e67089862247b40a..c125f105c84d0dfa5eb3686303609456bf283ab5 100644 (file)
@@ -188,7 +188,8 @@ public class P3DUtil {
                Plant3D p3d = Plant3D.getInstance(graph);
                String name = graph.getRelatedValue(r, l0.HasName);
                String uri = graph.getURI(r);
-               Item item = new Item(uri, name);
+               String label = graph.getPossibleRelatedValue(r, l0.HasLabel);
+               Item item = new Item(uri, name, label);
                if (graph.isInstanceOf(r, p3d.Equipment))
                        item.setType(Type.EQUIPMENT);
                else if (graph.isInstanceOf(r, p3d.InlineComponent))
@@ -229,11 +230,15 @@ public class P3DUtil {
        public static void finalizeDBLoad(P3DRootNode rootNode) throws Exception{
                for (INode node : rootNode.getChild()) {
                        if (node instanceof PipeRun) {
-                               for (PipelineComponent pc : ((PipeRun) node).getChild())
+                               for (PipelineComponent pc : ((PipeRun) node).getChild()) {
                                        pc.sync();
+                                       pc.updateParameters();
+                               }
                        } else if (node instanceof Equipment) {
-                               for (PipelineComponent pc : ((Equipment) node).getChild())
+                               for (PipelineComponent pc : ((Equipment) node).getChild()) {
                                        pc.sync();
+                                       pc.updateParameters();
+                               }
                        }
                }