From a1b6358cf6bc2d606ea2ab6fa4c27607cddc1300 Mon Sep 17 00:00:00 2001 From: Gregory Shrago Date: Fri, 4 Mar 2011 20:23:02 +0300 Subject: [PATCH] DBView: Move Import to Add and exception fix --- .../intellij/openapi/actionSystem/impl/ActionButton.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java index 416b9e8e0881..bb74c36c941f 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java @@ -148,7 +148,13 @@ public class ActionButton extends JComponent implements ActionButtonComponent { return presentation; } }); - popupMenu.getComponent().show(this, getWidth(), 0); + if (ActionPlaces.isToolbarPlace(event.getPlace())) { + popupMenu.getComponent().show(this, 0, getHeight()); + } + else { + popupMenu.getComponent().show(this, getWidth(), 0); + } + } else { myAction.actionPerformed(event); }