summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-03-12 11:24:37 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-13 14:51:05 +0100
commit75614792fa2370b6b0402117bfef8efc364b7b67 (patch)
tree6a2fc3ad45dfc1d747685e4d9368769956978eed /src/corelib
parentf75b7e78a3c14d8d66e398a94634cc9c98789c33 (diff)
Fixed bug in QTimeLine::setPaused(false)
The problem was that the elapsed timer was not restarted, causing the currentTime() not being adjusted for the time it was paused. Task-number: QTBUG-30108 Change-Id: Ib9b2c5a0dea52762109e0b25f1068dd7c88e15ba Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qtimeline.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp
index 390effb6c2..976c03aef4 100644
--- a/src/corelib/tools/qtimeline.cpp
+++ b/src/corelib/tools/qtimeline.cpp
@@ -744,7 +744,10 @@ void QTimeLine::setPaused(bool paused)
d->timerId = 0;
d->setState(Paused);
} else if (!paused && d->state == Paused) {
+ // Same as resume()
d->timerId = startTimer(d->updateInterval);
+ d->startTime = d->currentTime;
+ d->timer.start();
d->setState(Running);
}
}