diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-09-02 01:27:10 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-09-02 01:27:10 (GMT) |
commit | d76c52133160f4394df2d6dc4d239c54833c1ab3 (patch) | |
tree | 4abdd21fbd6190a9a86609f99cf90cd04ff1090d /src/declarative | |
parent | b52bfac9d05de835682b9c2b2e1d79e0246e708a (diff) | |
download | Qt-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.cpp | 4 |
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(); } |