From: Tuukka Lehtonen Date: Mon, 1 Oct 2018 19:19:11 +0000 (+0300) Subject: Fixed StandardCopyHandler SWT threading regression X-Git-Tag: v1.43.0~136^2~347 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=aa5e7bb5d56b050cfbd2e4a5ab2cc4fdfe40850b;p=simantics%2Fplatform.git Fixed StandardCopyHandler SWT threading regression IStatusLineManager is now invoked properly from the SWT thread again. gitlab #74 gitlab #133 Change-Id: I8e4a9ad3fc26b4ab2a04ebe26c64114d12eda9a0 --- diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java index c8946df68..002a31381 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java @@ -159,8 +159,11 @@ public class StandardCopyHandler extends AbstractHandler { } private static void setStatus(String message) { - if (status != null) - status.setMessage(message); + if (status != null) { + SWTUtils.asyncExec( + PlatformUI.getWorkbench().getDisplay(), + () -> status.setMessage(message)); + } } private boolean formatSelectionToClipboardText(ExecutionEvent event) {