From: Tuukka Lehtonen Date: Mon, 3 Jul 2017 20:34:07 +0000 (+0300) Subject: Merge "Add hashcodes from URI's as id if no component is found for SVG print" X-Git-Tag: v1.31.0~279 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=a7bade7ee1884861928f8bd1f1a0887345d95eb6;hp=76061fee3ffb1b66ed4d78ce711ab44f38b7ffdf Merge "Add hashcodes from URI's as id if no component is found for SVG print" --- diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java index 1b7376f96..054db497d 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java @@ -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 diff --git a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorSupport.java b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorSupport.java index 4075e1e11..80e0393cf 100644 --- a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorSupport.java +++ b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorSupport.java @@ -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);