summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxflickable.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-07-29 01:27:08 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-07-29 01:27:08 (GMT)
commited934bd87a2922e7a044d59e45330cd078d06d8c (patch)
treeef836fa501dbbf8087249f885c881fcb0d642e6b /src/declarative/fx/qfxflickable.cpp
parent707554cfe8acd115e2ee965b538d1d5fb8f82dc6 (diff)
downloadQt-ed934bd87a2922e7a044d59e45330cd078d06d8c.zip
Qt-ed934bd87a2922e7a044d59e45330cd078d06d8c.tar.gz
Qt-ed934bd87a2922e7a044d59e45330cd078d06d8c.tar.bz2
Don't create a zero distance flick. Make fixupX and fixupY equivalent.
Diffstat (limited to 'src/declarative/fx/qfxflickable.cpp')
-rw-r--r--src/declarative/fx/qfxflickable.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp
index d94c6d8..e73c8a4 100644
--- a/src/declarative/fx/qfxflickable.cpp
+++ b/src/declarative/fx/qfxflickable.cpp
@@ -128,16 +128,17 @@ void QFxFlickablePrivate::fixupX()
vTime = _tl.time();
- if (_moveX.value() > q->minXExtent() || q->maxXExtent() > 0) {
+ if (_moveX.value() > q->minXExtent() || (q->maxXExtent() > q->maxXExtent())) {
_tl.clear();
- _tl.move(_moveX, q->minXExtent(), QEasingCurve(QEasingCurve::InOutQuad), 200);
- flicked = false;
+ if (_moveX.value() != q->minXExtent())
+ _tl.move(_moveX, q->minXExtent(), QEasingCurve(QEasingCurve::InOutQuad), 200);
//emit flickingChanged();
} else if (_moveX.value() < q->maxXExtent()) {
_tl.clear();
_tl.move(_moveX, q->maxXExtent(), QEasingCurve(QEasingCurve::InOutQuad), 200);
- flicked = false;
//emit flickingChanged();
+ } else {
+ flicked = false;
}
}
@@ -151,7 +152,8 @@ void QFxFlickablePrivate::fixupY()
if (_moveY.value() > q->minYExtent() || (q->maxYExtent() > q->minYExtent())) {
_tl.clear();
- _tl.move(_moveY, q->minYExtent(), QEasingCurve(QEasingCurve::InOutQuad), 200);
+ if (_moveY.value() != q->minYExtent())
+ _tl.move(_moveY, q->minYExtent(), QEasingCurve(QEasingCurve::InOutQuad), 200);
//emit flickingChanged();
} else if (_moveY.value() < q->maxYExtent()) {
_tl.clear();