when hidden, don't bother to keep animating the move. the tooltip will be repositioned on show anyways.

svn path=/trunk/KDE/kdelibs/; revision=1179173
This commit is contained in:
Aaron J. Seigo 2010-09-24 18:19:58 +00:00
parent 735c89c730
commit 9ecae806dd

View File

@ -228,9 +228,12 @@ void ToolTip::showEvent(QShowEvent *e)
void ToolTip::hideEvent(QHideEvent *e)
{
QWidget::hideEvent(e);
d->animation->stop();
if (d->source) {
QMetaObject::invokeMethod(d->source.data(), "toolTipHidden");
}
WindowEffects::highlightWindows(winId(), QList<WId>());
}
@ -347,9 +350,7 @@ void ToolTip::moveTo(const QPoint &to)
return;
}
if (d->animation->state() == QAbstractAnimation::Running) {
d->animation->stop();
}
d->animation->stop();
d->animation->setEndValue(to);
d->animation->start();
}