summaryrefslogtreecommitdiff
path: root/src/gui/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorKarim Pinter <ext-karim.1.pinter@nokia.com>2010-11-29 14:21:23 +0200
committerKarim Pinter <ext-karim.1.pinter@nokia.com>2010-11-29 14:21:23 +0200
commit87291d518beb131b5b80540d46d53b54c2366a9c (patch)
tree8d543f287ddcfb3a7436f9d730c85bdd4fe2bd65 /src/gui/widgets/qmenu.cpp
parentcb34d11e4c98e768432e00c867b3321d3b89dd9d (diff)
downloadqt4-tools-87291d518beb131b5b80540d46d53b54c2366a9c.tar.gz
Removes the reseting of the QMenu offset.
On s60 when the qmenu is opened on the second time, it restores the position of the last activated menu, so there is no need to reset the offset when the popup() is called again. Task-number: QTBUG-9505
Diffstat (limited to 'src/gui/widgets/qmenu.cpp')
-rw-r--r--src/gui/widgets/qmenu.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 4bea6de0e2..d9233f508b 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1795,10 +1795,14 @@ QSize QMenu::sizeHint() const
void QMenu::popup(const QPoint &p, QAction *atAction)
{
Q_D(QMenu);
+#ifndef Q_WS_S60
+ //on S60 opens the menu at the same position it was activated last time
+ //there is no need to reset the offset fix for QTBUG-9505
if (d->scroll) { // reset scroll state from last popup
d->scroll->scrollOffset = 0;
d->scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
}
+#endif
d->tearoffHighlighted = 0;
d->motions = 0;
d->doChildEffects = true;