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>
This commit is contained in:
parent
48773be981
commit
c02cc25e83
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user