From c02cc25e833c7604c853661a41b5891e702efed0 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 18 Mar 2014 16:34:15 +0100 Subject: [PATCH] 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. Task-number: QTBUG-20094 Change-Id: I9d1b1358fe64c259dc47f35db8fc8f2b19a73153 Reviewed-by: J-P Nurmi --- src/widgets/widgets/qmenu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 6ad9c4073c..82de68eb4f 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2887,6 +2887,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);