aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2011-07-29 13:10:25 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-29 09:39:41 +0200
commit62917a96222ac8d3a391b0aefe2ee8905c8da874 (patch)
tree45a8dae96425312318e43b7efed5e8f8f5e5915d /src/declarative/util
parentcbd0bc1fbcbe48811d2e80df5cae9c9c523863a0 (diff)
Ensure bindings on pause work correctly.
Defer the actual pause, in the same way we defer the actual start. Task-number: QTBUG-19080 Change-Id: I500e5aa6678cbb5321979fda31f60d6d6e19a61e Reviewed-on: http://codereview.qt.nokia.com/2366 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 213ebe564a..56867d84ea 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -265,6 +265,10 @@ void QDeclarativeAbstractAnimation::setPaused(bool p)
}
d->paused = p;
+
+ if (!d->componentComplete)
+ return;
+
if (d->paused)
qtAnimation()->pause();
else
@@ -292,6 +296,10 @@ void QDeclarativeAbstractAnimation::componentFinalized()
d->running = false;
setRunning(true);
}
+ if (d->paused) {
+ d->paused = false;
+ setPaused(true);
+ }
}
/*!