diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-21 08:29:00 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-21 08:43:19 (GMT) |
commit | a5248cd47a6d210c8faec20a8d962c88bbeb7846 (patch) | |
tree | 4f40b03f0bd6a714769dc9d7e99c2bce1800a33f /src | |
parent | 965a0d60fe28666471e9ffb99a7e97097254a4cc (diff) | |
download | Qt-a5248cd47a6d210c8faec20a8d962c88bbeb7846.zip Qt-a5248cd47a6d210c8faec20a8d962c88bbeb7846.tar.gz Qt-a5248cd47a6d210c8faec20a8d962c88bbeb7846.tar.bz2 |
Fixes bug when adding the same child animation twice to the same group
The child animation was removed twice from the group because in
QAnimationGroup::insertAnimationAt the insertion in the list was done
before removing the animation.
Reviewed-by: Jan-Arve
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/animation/qanimationgroup.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/animation/qanimationgroup.cpp b/src/corelib/animation/qanimationgroup.cpp index f39738b..03573bb 100644 --- a/src/corelib/animation/qanimationgroup.cpp +++ b/src/corelib/animation/qanimationgroup.cpp @@ -164,9 +164,10 @@ void QAnimationGroup::insertAnimationAt(int index, QAbstractAnimation *animation return; } - d->animations.insert(index, animation); if (QAnimationGroup *oldGroup = animation->group()) oldGroup->removeAnimation(animation); + + d->animations.insert(index, animation); QAbstractAnimationPrivate::get(animation)->group = this; // this will make sure that ChildAdded event is sent to 'this' animation->setParent(this); |