From: Tuukka Lehtonen Date: Tue, 13 Feb 2018 14:59:55 +0000 (+0200) Subject: Fixed TrendView.setFocus to not deadlock X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F1453%2F1;p=simantics%2Fsysdyn.git Fixed TrendView.setFocus to not deadlock Calling JPanel.requestFocus from SWT thread is a surefire way to lock the UI up. refs #7763 Change-Id: I5f68bba426fe47ca9c1b529986628ecd3c9ec1fb --- diff --git a/bundles/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/TrendView.java b/bundles/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/TrendView.java index ef13a426..32e2b695 100644 --- a/bundles/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/TrendView.java +++ b/bundles/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/TrendView.java @@ -289,8 +289,8 @@ public class TrendView extends ViewPart { @Override public void setFocus() { - if(panel != null) - panel.requestFocus(); + if(composite != null) + composite.setFocus(); }