and unhover without anims.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812650
This commit is contained in:
Aaron J. Seigo 2008-05-25 21:47:09 +00:00
parent f0da40111e
commit 83a0bdac74

View File

@ -502,7 +502,17 @@ void Icon::setSvg(const QString &svgFilePath, const QString &elementId)
void Icon::hoverEffect(bool show) void Icon::hoverEffect(bool show)
{ {
if (show) {
d->states |= Private::HoverState;
}
if (d->m_hoverAnimId == -1 && !d->drawBg) { if (d->m_hoverAnimId == -1 && !d->drawBg) {
// we do this only when we don't do the anim, because
// this gets set at animation end when we are animating
if (!show) {
d->states &= ~Private::HoverState;
}
return; return;
} }
@ -1091,7 +1101,6 @@ void Icon::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
action->show(); action->show();
action->event(event->type(), event->pos()); action->event(event->type(), event->pos());
} }
d->states |= Private::HoverState;
hoverEffect(true); hoverEffect(true);
update(); update();