]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java
Added getter for GraphToDiagramSynchronizer to DSGP
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / sg / DiagramSceneGraphProvider.java
index 3d800d1f1f43d56ff82c929f9e0fcc4aa12ea6fb..9eb653f263b605f9fd5044481320c119d0e94dff 100644 (file)
@@ -171,6 +171,10 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi
         }
     }
 
+    public GraphToDiagramSynchronizer getGraphToDiagramSynchronizer() {
+        return synchronizer;
+    }
+
     protected CopyPasteStrategy getCopyPasteStrategy() {
                try {
                        CopyPasteStrategy cpStrategy = Simantics.getSession().syncRequest(new PossibleAdapter<CopyPasteStrategy>(resource, CopyPasteStrategy.class));
@@ -244,7 +248,7 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi
         ctx.add( new ElementInteractor() );
         ctx.add( new Selection() );
         ctx.add( new DiagramParticipant() );
-        ctx.add( new ElementPainter(false) );
+        ctx.add( new ElementPainter(true) );
 
         //ctx.add( new ElementHeartbeater() );
         ctx.add( new ZOrderHandler() );
@@ -431,7 +435,7 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi
 
         try {
             // FIXME: I have no idea if this works or not..
-            diagram = SimanticsUI.getSession().syncRequest(new Read<IDiagram>() {
+            diagram = Simantics.getSession().syncRequest(new Read<IDiagram>() {
                 @Override
                 public IDiagram perform(ReadGraph graph) throws DatabaseException {
                     IDiagram d = synchronizer.loadDiagram(new NullProgressMonitor(), graph, null, structuralPath.resources[0], null, structuralPath.removeFromBeginning(0), hints);