summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-09-02 01:27:10 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-09-02 01:27:10 (GMT)
commitd76c52133160f4394df2d6dc4d239c54833c1ab3 (patch)
tree4abdd21fbd6190a9a86609f99cf90cd04ff1090d /src/declarative
parentb52bfac9d05de835682b9c2b2e1d79e0246e708a (diff)
downloadQt-d76c52133160f4394df2d6dc4d239c54833c1ab3.zip
Qt-d76c52133160f4394df2d6dc4d239c54833c1ab3.tar.gz
Qt-d76c52133160f4394df2d6dc4d239c54833c1ab3.tar.bz2
Fix animation-after-zooming problem.
Ensures final viewport XY is set and that setting it always clears animations (even if the position is coincidentally unchanged). Case is changing width/height twice - once too small, then large enough again, first change starts correction animation, which must be stopped by second change.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/fx/qfxflickable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp
index 27bfa27..118658f 100644
--- a/src/declarative/fx/qfxflickable.cpp
+++ b/src/declarative/fx/qfxflickable.cpp
@@ -386,8 +386,8 @@ void QFxFlickable::setViewportX(qreal pos)
{
Q_D(QFxFlickable);
pos = qRound(pos);
+ d->_tl.reset(d->_moveX);
if (-pos != d->_moveX.value()) {
- d->_tl.reset(d->_moveX);
d->_moveX.setValue(-pos);
viewportMoved();
}
@@ -403,8 +403,8 @@ void QFxFlickable::setViewportY(qreal pos)
{
Q_D(QFxFlickable);
pos = qRound(pos);
+ d->_tl.reset(d->_moveY);
if (-pos != d->_moveY.value()) {
- d->_tl.reset(d->_moveY);
d->_moveY.setValue(-pos);
viewportMoved();
}