summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-06-24 04:46:55 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-06-24 05:11:02 (GMT)
commitf2fc1355306219eaec9042462d3be4aceed1b829 (patch)
tree177b12595819a378faa933454cf04e4bbd1171a4 /src
parentae422458fdbd9a2cdbc48024b31f7e5528baebb4 (diff)
downloadQt-f2fc1355306219eaec9042462d3be4aceed1b829.zip
Qt-f2fc1355306219eaec9042462d3be4aceed1b829.tar.gz
Qt-f2fc1355306219eaec9042462d3be4aceed1b829.tar.bz2
Prevent value source animations from being registered to start twice.
If the animation had an explicit "running: true", the animation would be registered with the engine twice, which prevented a proper start.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index f807866..add27f3 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -176,6 +176,8 @@ void QDeclarativeAbstractAnimation::setRunning(bool r)
{
Q_D(QDeclarativeAbstractAnimation);
if (!d->componentComplete) {
+ if (d->running && r == d->running) //don't re-register
+ return;
d->running = r;
if (r == false)
d->avoidPropertyValueSourceStart = true;