From a74b658406cde61563f7b08c935e831fdb043052 Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Thu, 11 May 2017 12:24:22 +0300 Subject: [PATCH] StyleBase runs cleanup in wrong thread refs #7206 Change-Id: I607539b6e5aabc947976308b972976ee97b9c4ea (cherry picked from commit d156f756b493ce0f853fcb5619809812ea764167) --- .../src/org/simantics/diagram/profile/StyleBase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/profile/StyleBase.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/profile/StyleBase.java index 5aed90b48..ee203616d 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/profile/StyleBase.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/profile/StyleBase.java @@ -457,7 +457,11 @@ public abstract class StyleBase 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() { -- 2.47.1