]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Merge "Add hashcodes from URI's as id if no component is found for SVG print"
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 3 Jul 2017 20:34:07 +0000 (23:34 +0300)
committerGerrit Code Review <gerrit2@www.simantics.org>
Mon, 3 Jul 2017 20:34:07 +0000 (23:34 +0300)
bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java
bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorSupport.java

index 1b7376f96e4301814ba70ac861635ff058806cce..054db497d2cf7a46f9d8b425cf84fa01eebdd7a0 100644 (file)
@@ -524,7 +524,7 @@ public class RouteGraphUtils {
         }
     }
 
-    private static final ConnectionStyle DEFAULT_CONNECTION_STYLE = new ExampleConnectionStyle();
+    private static final ConnectionStyle DEFAULT_CONNECTION_STYLE = new BasicConnectionStyle(Color.BLACK, Color.BLACK, 3, ExampleConnectionStyle.SOLID, ExampleConnectionStyle.SOLID, 8);
 
     /**
      * @param graph
index 4075e1e11efaec0a6b3161db1bf9cf2b3f67bdba..80e0393cf42e6da121ed96f0e016d5cbf4b836b7 100644 (file)
@@ -311,7 +311,9 @@ public class ResourceEditorSupport implements IAdaptable, ChangeListener {
     }
 
     private static void scheduleEditorClose(IEditorPart editorPart) {
-        SWTUtils.asyncExec(editorPart.getSite().getShell(), () -> {
+        if (editorPart == null)
+            return;
+        SWTUtils.asyncExec(editorPart.getSite().getWorkbenchWindow().getShell(), () -> {
             // Don't have to check isDisposed since closeEditor
             // will ignore already closed editor parts.
             WorkbenchUtils.closeEditor(editorPart, false);