From 75614792fa2370b6b0402117bfef8efc364b7b67 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Tue, 12 Mar 2013 11:24:37 +0100 Subject: 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 --- src/corelib/tools/qtimeline.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/corelib/tools/qtimeline.cpp') 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); } } -- cgit v1.2.3