diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2014-03-18 16:34:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-19 19:52:10 +0100 |
commit | c02cc25e833c7604c853661a41b5891e702efed0 (patch) | |
tree | dc51ddffc898a3fd1e64f2a97bea8c9ed56625f3 /src/widgets | |
parent | 48773be981ea7be75eb0b041e383d5c4089abd02 (diff) |
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 <jpnurmi@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/widgets/qmenu.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); |