catch an edge condition where propAnim isn't created on fade out
BUG:230159 svn path=/trunk/KDE/kdelibs/; revision=1101747
This commit is contained in:
parent
78201bdf2c
commit
bfe45534fc
@ -963,16 +963,18 @@ void AppletHandle::startFading(FadeType anim, const QPointF &hoverPos, bool pres
|
|||||||
time *= m_opacity;
|
time *= m_opacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
propAnim->setStartValue(0);
|
if (propAnim) {
|
||||||
propAnim->setEndValue(1);
|
propAnim->setStartValue(0);
|
||||||
propAnim->setDuration(time);
|
propAnim->setEndValue(1);
|
||||||
|
propAnim->setDuration(time);
|
||||||
|
}
|
||||||
|
|
||||||
m_animType = anim;
|
m_animType = anim;
|
||||||
//kDebug() << "animating for " << time << "ms";
|
//kDebug() << "animating for " << time << "ms";
|
||||||
if (m_animType == FadeIn) {
|
if (m_animType == FadeIn) {
|
||||||
propAnim->setDirection(QAbstractAnimation::Forward);
|
propAnim->setDirection(QAbstractAnimation::Forward);
|
||||||
propAnim->start();
|
propAnim->start();
|
||||||
} else {
|
} else if (propAnim) {
|
||||||
propAnim->setDirection(QAbstractAnimation::Backward);
|
propAnim->setDirection(QAbstractAnimation::Backward);
|
||||||
propAnim->start(QAbstractAnimation::DeleteWhenStopped);
|
propAnim->start(QAbstractAnimation::DeleteWhenStopped);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user