]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
StyleBase runs cleanup in wrong thread 01/501/1
authorAntti Villberg <antti.villberg@semantum.fi>
Thu, 11 May 2017 09:24:22 +0000 (12:24 +0300)
committerAntti Villberg <antti.villberg@semantum.fi>
Thu, 11 May 2017 09:24:22 +0000 (12:24 +0300)
refs #7206

Change-Id: I607539b6e5aabc947976308b972976ee97b9c4ea

bundles/org.simantics.diagram/src/org/simantics/diagram/profile/StyleBase.java

index 5aed90b48931b2a15bb911b0986860d96e01481f..ee203616da950f31d0fa1f1abbfae793de988f2d 100644 (file)
@@ -457,7 +457,11 @@ public abstract class StyleBase<Result> implements Style {
      * @param items the diagram data items that need to be cleaned up
      */
     protected final void cleanupItems(final EvaluationContext evaluationContext, final IDiagram diagram, final Object[] items) {
-        AWTThread.getThreadAccess().asyncExec(new Runnable() {
+
+        ICanvasContext context = evaluationContext.getConstant(ProfileKeys.CANVAS);
+
+       context.getThreadAccess().asyncExec(new Runnable() {
+               
             @Override
             public void run() {