summaryrefslogtreecommitdiffstats
path: root/src/controls/qtmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/qtmenu.cpp')
-rw-r--r--src/controls/qtmenu.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/controls/qtmenu.cpp b/src/controls/qtmenu.cpp
index dfed4e321..cbedf732f 100644
--- a/src/controls/qtmenu.cpp
+++ b/src/controls/qtmenu.cpp
@@ -297,8 +297,13 @@ void QtMenu::popup()
void QtMenu::__popup(qreal x, qreal y, int atItemIndex)
{
- if (popupVisible())
+ if (popupVisible()) {
__closeMenu();
+ // Mac and Windows would normally move the menu under the cursor, so we should not
+ // return here. However, very often we want to re-contextualize the menu, and this
+ // has to be done at the application level.
+ return;
+ }
setPopupVisible(true);