summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenubar.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-06-18 10:39:46 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-06-18 10:41:29 (GMT)
commitcc08a4d04894eace196631029731a3af37547b7f (patch)
tree4a2751fe03b6506090886d7333386fb477398661 /src/gui/widgets/qmenubar.cpp
parentcab70bbf1d29a7cdf81d561fdd74e16f7280c689 (diff)
downloadQt-cc08a4d04894eace196631029731a3af37547b7f.zip
Qt-cc08a4d04894eace196631029731a3af37547b7f.tar.gz
Qt-cc08a4d04894eace196631029731a3af37547b7f.tar.bz2
QMenuBar: fixed highlight problem on actions without menu
An item without menu could stay highlighted even when the mouse left the menu bar. Task-number: 256322 Reviewed-by: alexis
Diffstat (limited to 'src/gui/widgets/qmenubar.cpp')
-rw-r--r--src/gui/widgets/qmenubar.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 3857e30..34de252 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -1253,7 +1253,8 @@ void QMenuBar::mouseMoveEvent(QMouseEvent *e)
void QMenuBar::leaveEvent(QEvent *)
{
Q_D(QMenuBar);
- if(!hasFocus() && !d->popupState)
+ if((!hasFocus() && !d->popupState) ||
+ (d->currentAction && d->currentAction->menu() == 0))
d->setCurrentAction(0);
}