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=bf0d5b733460c13ca09055e08ecc7f555c88e153;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(); }