always reset the icon change timer: will cause less unneeded animations

svn path=/trunk/KDE/kdelibs/; revision=1100808
This commit is contained in:
Marco Martin 2010-03-08 17:44:59 +00:00
parent 0ad75a51db
commit 2f308de3da

View File

@ -1227,10 +1227,10 @@ void IconWidget::setIcon(const QIcon &icon)
if (!(d->states & IconWidgetPrivate::HoverState) && !d->iconChangeTimer->isActive() && d->oldIcon.isNull() && !d->icon.isNull() && !icon.isNull()) {
d->oldIcon = d->icon;
d->animateMainIcon(true, d->states);
d->iconChangeTimer->start(300);
} else {
d->oldIcon = QIcon();
}
d->iconChangeTimer->start(300);
d->icon = icon;
update();
}