From fc8bada79e686004faf5613202859e79ab49f1ab Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 5 Nov 2009 14:08:35 +0100 Subject: API review from yesterday made a bug appear for the pause animations --- src/corelib/animation/qabstractanimation.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index d46ac92..f967081 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -50,7 +50,7 @@ animations that plug into the rest of the animation framework. The progress of an animation is given by its current time - (currentTime()), which is measured in milliseconds from the start + (currentLoopTime()), which is measured in milliseconds from the start of the animation (0) to its end (duration()). The value is updated automatically while the animation is running. It can also be set directly with setCurrentTime(). @@ -214,6 +214,10 @@ void QUnifiedTimer::restartAnimationTimer() { if (runningLeafAnimations == 0 && !runningPauseAnimations.isEmpty()) { int closestTimeToFinish = closestPauseAnimationTimeToFinish(); + if (closestTimeToFinish < 0) { + qDebug() << runningPauseAnimations; + qDebug() << closestPauseAnimationTimeToFinish(); + } animationTimer.start(closestTimeToFinish, this); isPauseTimerActive = true; } else if (!animationTimer.isActive() || isPauseTimerActive) { @@ -288,9 +292,11 @@ void QUnifiedTimer::registerRunningAnimation(QAbstractAnimation *animation) if (QAbstractAnimationPrivate::get(animation)->isGroup) return; - if (QAbstractAnimationPrivate::get(animation)->isPause) + if (QAbstractAnimationPrivate::get(animation)->isPause) { + if (animation->duration() == -1) + qDebug() << "toto"; runningPauseAnimations << animation; - else + } else runningLeafAnimations++; } @@ -314,9 +320,9 @@ int QUnifiedTimer::closestPauseAnimationTimeToFinish() int timeToFinish; if (animation->direction() == QAbstractAnimation::Forward) - timeToFinish = animation->duration() - animation->currentTime(); + timeToFinish = animation->duration() - animation->currentLoopTime(); else - timeToFinish = animation->currentTime(); + timeToFinish = animation->currentLoopTime(); if (timeToFinish < closestTimeToFinish) closestTimeToFinish = timeToFinish; @@ -737,7 +743,7 @@ void QAbstractAnimation::start(DeletionPolicy policy) signal, and state() returns Stopped. The current time is not changed. If the animation stops by itself after reaching the end (i.e., - currentTime() == duration() and currentLoop() > loopCount() - 1), the + currentLoopTime() == duration() and currentLoop() > loopCount() - 1), the finished() signal is emitted. \sa start(), state() -- cgit v0.12 value='bug3036566'>bug3036566 Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/doc
Commit message (Expand)AuthorAgeFilesLines
* mergedgp2016-09-085-17/+37
|\
| * [db0a5f6417] Make a few tests resilient to differences in semantics of pipes ...dkf2016-07-261-0/+12
| |\
| | * [db0a5f6417] Make a few tests resilient to differences in semantics of pipes ...dkf2016-07-261-0/+12
| | |\
| | | * Make a few tests more resilient to differences in the semantics of pipes betw...bug_db0a5f6417dkf2016-07-241-0/+12
| * | | [6a19dedc2e] "Clarified" what the units are that [chan copy] uses for -size a...dkf2016-07-242-9/+17
| |\ \ \ | | |/ /
| | * | [6a19dedc2e] "Clarified" what the units are that [chan copy] uses for -size a...dkf2016-07-242-9/+17
| | |/
| * | [104f2885bb] Rework the "chan" Tcl_ObjType to properly validate cached channe...dgp2016-07-181-1/+1
| |\ \ | | |/
| | * Fix docs and test failures. I had rolled back .PS1 (Powershell files) as bein...ashok2016-07-151-1/+1
| * | Make hash type changable by compiling with -DTCL_HASH_TYPE=size_t (for exampl...jan.nijtmans2016-07-121-1/+1
| * | merge 8.6dgp2016-07-092-6/+6
| |\ \ | | |/
| | * Fixed docs for prior check-in (exec of .CMD files on Windows)ashok2016-07-091-2/+3
| | * Bugfix [3613671]. file owned implementation for Windows.ashok2016-07-091-4/+3
* | | merge microoptdgp2016-09-087-17/+53
|\ \ \ | |/ /
| * | Merge core-8-6-branch: jan.nijtmans2016-07-071-1/+3
| |\ \ | | |/
| | * Bugfix [5d7ea04580]. Treat .cmd and .ps1 files are executable on Windows.ashok2016-07-071-1/+3
| * | Use conventional list operations for ensemble dispatchjan.nijtmans2016-07-041-1/+1
| |\ \ | | |/
| | * typo and end-of-line spacingjan.nijtmans2016-07-041-1/+1
| * | Tcl_SetVar -> Tcl_SetVar2 and comparable replacements, eliminating functions ...jan.nijtmans2016-06-291-1/+1
| * | [dd260aaf72] Allow the -dictionary option to be read from a pushed transform.dkf2016-06-271-6/+12
| |\ \ | | |/
| | * [dd260aaf72] Allow the -dictionary option to be read from a pushed transform.dkf2016-06-271-6/+12
| | * [c3d956be5b] Clearer text about positioning of optional arguments.dkf2016-06-271-5/+23
| | * (cherry-pick) Merge TIP #447: Execution Time Verbosity Levels in tcltest::con...jan.nijtmans2016-06-021-2/+12
| * | [c3d956be5b] Clearer text about positioning of optional arguments.dkf2016-06-271-5/+23
| * | Merge TIP #447: Execution Time Verbosity Levels in tcltest::configuregahr2016-06-011-2/+12
| |\ \
| | * | Add a note in tcltest manual page to betray false expectations on msec and usec.gahr2016-05-041-0/+6
| | * | Implement msec and usec verbosity levels in tcltest::configuregahr2016-04-201-2/+6
| * | | Change "integer string" to "integer" in documentation for [tell]. It's not n...andy2016-05-261-1/+1
| |/ /
* | | merge bytecode init reworkingdgp2016-09-08