From 41dd38a0e2b76b320205aa4656e855c724bc28d1 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 18 Mar 2014 16:27:40 +0100 Subject: QMenu: Sloppy menu selection should allow hovering separators Setting the current action to 0 clears the sloppy region and closes the submenu if we hover a separator on the way to the submenu popup. Now, we choose not to while the sloppy delay timer is running. This is a backport of I9d1b1358fe64c259dc47f35db8fc8f2b19a73153 from qt/qtbase. Task-number: QTBUG-20094 Change-Id: If4b3cff05a9bcb41cee3e49490d4cc5fc3595821 Reviewed-by: J-P Nurmi Reviewed-by: Lars Knoll --- src/gui/widgets/qmenu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 0e4ecde..75ee80a 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -2864,6 +2864,7 @@ void QMenu::mouseMoveEvent(QMouseEvent *e) QAction *action = d->actionAt(e->pos()); if (!action || action->isSeparator()) { if (d->hasHadMouse + && d->sloppyDelayTimer == 0 // Keep things as they are while we're moving to the submenu && (!d->currentAction || (action && action->isSeparator()) || !(d->currentAction->menu() && d->currentAction->menu()->isVisible()))) d->setCurrentAction(0); -- cgit v0.12