summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/qmenu.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 56b8cb1..31df3f6 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -483,9 +483,9 @@ void QMenuPrivate::setSyncAction()
void QMenuPrivate::setFirstActionActive()
{
Q_Q(QMenu);
+ updateActionRects();
const int scrollerHeight = q->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, q);
for(int i = 0, saccum = 0; i < actions.count(); i++) {
- QAction *act = actions.at(i);
const QRect &rect = actionRects.at(i);
if (rect.isNull())
continue;
@@ -494,6 +494,7 @@ void QMenuPrivate::setFirstActionActive()
if (saccum > scroll->scrollOffset-scrollerHeight)
continue;
}
+ QAction *act = actions.at(i);
if (!act->isSeparator() &&
(q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, q)
|| act->isEnabled())) {