summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-04-16 14:21:58 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-04-16 14:21:58 (GMT)
commit3d86aa8f7188bee865bd286fa7dffd80a5c78215 (patch)
tree793b64b0cbf37d6ca3468693d8db9cfef3f0addb /src/gui/widgets/qmenu.cpp
parentd22afdb8cf874aae3c5593f6108d4c7897a8ac20 (diff)
downloadQt-3d86aa8f7188bee865bd286fa7dffd80a5c78215.zip
Qt-3d86aa8f7188bee865bd286fa7dffd80a5c78215.tar.gz
Qt-3d86aa8f7188bee865bd286fa7dffd80a5c78215.tar.bz2
QMenu: Behavior regression
When opening a submenu, and then moving the mouse over the parent menu margins, the submenu would close, whereas it didn't in 4.5. Reviewed-by: Olivier Task-number: QTBUG-9785
Diffstat (limited to 'src/gui/widgets/qmenu.cpp')
-rw-r--r--src/gui/widgets/qmenu.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index c7573bf..d0ae90c 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -2813,7 +2813,9 @@ void QMenu::mouseMoveEvent(QMouseEvent *e)
QAction *action = d->actionAt(e->pos());
if (!action) {
- if (d->hasHadMouse)
+ if (d->hasHadMouse
+ && (!d->currentAction
+ || !(d->currentAction->menu() && d->currentAction->menu()->isVisible())))
d->setCurrentAction(0);
return;
} else if(e->buttons()) {