Don't start the fade out animation when the overlay is hidden or when

the animation is already running.

svn path=/trunk/KDE/kdebase/apps/; revision=1055277
This commit is contained in:
Fredrik Höglund 2009-11-27 18:54:05 +00:00
parent 3d478b8d9e
commit e3c300edd0

View file

@ -188,7 +188,10 @@ void ActionOverlay::timeout()
// allow the animation to restart after hiding the ActionOverlayIcon even if m_hoverIndex didn't change
m_hoverIndex = QPersistentModelIndex();
fadeOut->start();
if (isVisible() && (!fadeOut->animation() || fadeOut->animation()->state() != QAbstractAnimation::Running)) {
fadeOut->start();
connect(fadeOut->animation(), SIGNAL(finished()), SLOT(close()));
}
}
void ActionOverlay::forceHide(HideHint hint)
@ -219,3 +222,4 @@ void ActionOverlay::modelChanged()
QAbstractItemModel *mod = view->model();
connect(mod, SIGNAL(rowsRemoved(QModelIndex, int, int)), SLOT(rowsRemoved(QModelIndex, int, int)));
}