summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorKarim Pinter <ext-karim.1.pinter@nokia.com>2010-11-29 12:21:23 (GMT)
committerKarim Pinter <ext-karim.1.pinter@nokia.com>2010-11-29 12:21:23 (GMT)
commit87291d518beb131b5b80540d46d53b54c2366a9c (patch)
tree8d543f287ddcfb3a7436f9d730c85bdd4fe2bd65 /src/gui/widgets
parentcb34d11e4c98e768432e00c867b3321d3b89dd9d (diff)
downloadQt-87291d518beb131b5b80540d46d53b54c2366a9c.zip
Qt-87291d518beb131b5b80540d46d53b54c2366a9c.tar.gz
Qt-87291d518beb131b5b80540d46d53b54c2366a9c.tar.bz2
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')
-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 4bea6de..d9233f5 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;