mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-69073, IDEA-67288 Toolwindow toolbars "stay" after closing via mouse if toolbar buttons in popup
This commit is contained in:
+9
-1
@@ -906,7 +906,15 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar {
|
||||
}
|
||||
});
|
||||
myPopup = builder.createPopup();
|
||||
|
||||
ActionManager.getInstance().addAnActionListener(new AnActionListener.Adapter() {
|
||||
@Override
|
||||
public void afterActionPerformed(AnAction action, DataContext dataContext, AnActionEvent event) {
|
||||
if (myPopup != null && !myPopup.isDisposed() && myPopup.isVisible()) {
|
||||
myPopup.cancel();
|
||||
}
|
||||
ActionManager.getInstance().removeAnActionListener(this);
|
||||
}
|
||||
});
|
||||
Disposer.register(myPopup, popupToolbar);
|
||||
|
||||
myPopup.showInScreenCoordinates(this, location);
|
||||
|
||||
Reference in New Issue
Block a user