summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-07-08 12:54:00 (GMT)
committermae <qt-info@nokia.com>2010-07-08 15:49:59 (GMT)
commit3f2a4f34f6206e3a94915a8d50ddfe81e047b88b (patch)
treecd793e2ec909b528902a920d39634563e2e02002
parent4123287497f38856a71d206f5e10193a5df77ca2 (diff)
downloadQt-3f2a4f34f6206e3a94915a8d50ddfe81e047b88b.zip
Qt-3f2a4f34f6206e3a94915a8d50ddfe81e047b88b.tar.gz
Qt-3f2a4f34f6206e3a94915a8d50ddfe81e047b88b.tar.bz2
Fix spring animation
Do not stop a spring animation if the to value got changed while notifying the target property change.
-rw-r--r--src/declarative/util/qdeclarativespringanimation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp
index 314b82b..d3eb0c5 100644
--- a/src/declarative/util/qdeclarativespringanimation.cpp
+++ b/src/declarative/util/qdeclarativespringanimation.cpp
@@ -183,11 +183,13 @@ void QDeclarativeSpringAnimationPrivate::tick(int time)
lastTime = time;
}
+ qreal old_to = to;
+
QDeclarativePropertyPrivate::write(defaultProperty, currentValue,
QDeclarativePropertyPrivate::BypassInterceptor |
QDeclarativePropertyPrivate::DontRemoveBinding);
- if (stop)
+ if (stop && old_to == to) // do not stop if we got restarted
clock.stop();
}