From 7f1d5ac4889b6d99c922b6c2db7bf9863b26c893 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 12 Mar 2012 20:54:56 +0400 Subject: [PATCH] Fix EA-346945: expire notifications in AWT (later). --- .../src/git4idea/roots/GitRootProblemNotifier.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/roots/GitRootProblemNotifier.java b/plugins/git4idea/src/git4idea/roots/GitRootProblemNotifier.java index 696aa941e448..14220d6bbe20 100644 --- a/plugins/git4idea/src/git4idea/roots/GitRootProblemNotifier.java +++ b/plugins/git4idea/src/git4idea/roots/GitRootProblemNotifier.java @@ -18,6 +18,7 @@ package git4idea.roots; import com.intellij.idea.ActionsBundle; import com.intellij.notification.Notification; import com.intellij.notification.NotificationListener; +import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.options.ShowSettingsUtil; import com.intellij.openapi.project.Project; @@ -87,7 +88,14 @@ public class GitRootProblemNotifier { private void expireNotification() { if (myNotification != null) { - myNotification.expire(); + final Notification notification = myNotification; + ApplicationManager.getApplication().invokeLater(new Runnable() { + @Override + public void run() { + notification.expire(); + } + }); + myNotification = null; } }