summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-05-04 03:39:34 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-05-04 03:39:34 (GMT)
commita9a97a9f1ed78d55888679f7ae1a1534f2b20fad (patch)
tree3df15064feddb1a2dbf83438592b79e33fde85a0 /src
parent536d0f141a13474122f99daf98bf6b54e635b474 (diff)
downloadQt-a9a97a9f1ed78d55888679f7ae1a1534f2b20fad.zip
Qt-a9a97a9f1ed78d55888679f7ae1a1534f2b20fad.tar.gz
Qt-a9a97a9f1ed78d55888679f7ae1a1534f2b20fad.tar.bz2
Ensure flick endpoint is recalculated for variable height lists.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index b462443..b713987 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -1085,7 +1085,7 @@ void QDeclarativeFlickable::setContentWidth(qreal w)
else
d->viewport->setWidth(w);
// Make sure that we're entirely in view.
- if (!d->pressed) {
+ if (!d->pressed && !d->moving) {
int oldDuration = d->fixupDuration;
d->fixupDuration = 0;
d->fixupX();
@@ -1112,7 +1112,7 @@ void QDeclarativeFlickable::setContentHeight(qreal h)
else
d->viewport->setHeight(h);
// Make sure that we're entirely in view.
- if (!d->pressed) {
+ if (!d->pressed && !d->moving) {
int oldDuration = d->fixupDuration;
d->fixupDuration = 0;
d->fixupY();
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 0f3ee61..0aa68db 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1164,6 +1164,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
moveReason = Mouse;
if ((!haveHighlightRange || highlightRange != QDeclarativeListView::StrictlyEnforceRange) && snapMode == QDeclarativeListView::NoSnap) {
+ correctFlick = true;
QDeclarativeFlickablePrivate::flick(data, minExtent, maxExtent, vSize, fixupCallback, velocity);
return;
}