MUQ does not need to be modality-state awaree
authorKirill Kalishev <kirill.kalishev@jetbrains.com>
Thu, 8 Oct 2009 15:12:39 +0000 (19:12 +0400)
committerKirill Kalishev <kirill.kalishev@jetbrains.com>
Thu, 8 Oct 2009 15:12:39 +0000 (19:12 +0400)
platform/platform-api/src/com/intellij/util/ui/update/MergingUpdateQueue.java

index 9bfd5fb7d2092695f4c9b6567912269f2dd68bec..050a4771b7f157faa1a87ce69b1de3164675fcc6 100644 (file)
@@ -20,6 +20,7 @@ import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.ModalityState;
 import com.intellij.openapi.util.Disposer;
 import com.intellij.util.Alarm;
+import com.intellij.util.ui.UIUtil;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.Nullable;
 
@@ -227,7 +228,7 @@ public class MergingUpdateQueue implements Runnable, Disposable, Activatable {
     };
 
     if (myExecuteInDispatchThread && invokeLaterIfNotDispatch && !ApplicationManager.getApplication().isDispatchThread()) {
-      ApplicationManager.getApplication().invokeLater(toRun, ModalityState.NON_MODAL);
+      UIUtil.invokeLaterIfNeeded(toRun);
     }
     else {
       toRun.run();