IDEA-80382 Notifications: when balloon is shown in Event Log and after clicking a link it expires, it should be hidden

This commit is contained in:
peter
2012-01-26 13:45:54 +01:00
parent d7dadda142
commit 0c3ac45cc2
2 changed files with 7 additions and 1 deletions
@@ -97,6 +97,11 @@ public class Notification {
public void expire() {
NotificationsManager.getNotificationsManager().expire(this);
hideBalloon();
myExpired = true;
}
public void hideBalloon() {
if (myBalloonRef != null) {
final Balloon balloon = myBalloonRef.get();
if (balloon != null) {
@@ -104,7 +109,6 @@ public class Notification {
}
myBalloonRef = null;
}
myExpired = true;
}
public void setBalloon(@Nullable final Balloon balloon) {
@@ -415,6 +415,8 @@ public class EventLog implements Notifications {
Balloon balloon = NotificationsManagerImpl.createBalloon(myNotification, true, true);
Disposer.register(project, balloon);
balloon.show(target, Balloon.Position.above);
myNotification.hideBalloon();
myNotification.setBalloon(balloon);
}
}