Fix QCommonStylePrivate::stopAnimation()
Make sure that QCommonStylePrivate::animation() does not return an animation that was already stopped. Change-Id: I35b7f8e0fabff9908f247b3632e35388e2c95a6d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
parent
85a8df184b
commit
dca34854ef
@ -1081,13 +1081,9 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const
|
||||
/*! \internal */
|
||||
void QCommonStylePrivate::stopAnimation(const QObject *target) const
|
||||
{
|
||||
QStyleAnimation *animation = animations.value(target);
|
||||
if (animation) {
|
||||
if (animation->state() == QAbstractAnimation::Stopped)
|
||||
animations.take(target)->deleteLater();
|
||||
else
|
||||
animation->stop();
|
||||
}
|
||||
QStyleAnimation *animation = animations.take(target);
|
||||
if (animation && animation->state() != QAbstractAnimation::Stopped)
|
||||
animation->stop();
|
||||
}
|
||||
|
||||
/*! \internal */
|
||||
|
Loading…
Reference in New Issue
Block a user