Fix IconAction animation

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=775286
This commit is contained in:
Marco Martin 2008-02-15 11:39:10 +00:00
parent c1d3f89a8b
commit 3f937278e1

View File

@ -238,7 +238,14 @@ void IconAction::paint(QPainter *painter) const
m_icon->size().height() < m_rect.height()*2.0) { m_icon->size().height() < m_rect.height()*2.0) {
return; return;
} }
painter->drawPixmap(m_rect.toRect(), Phase::self()->animationResult(m_animationId));
QPixmap animPixmap = Phase::self()->animationResult(m_animationId);
if (m_visible && animPixmap.isNull()) {
painter->drawPixmap(m_rect.toRect(), m_pixmap);
} else {
painter->drawPixmap(m_rect.toRect(), animPixmap);
}
} }
Icon::Icon(QGraphicsItem *parent) Icon::Icon(QGraphicsItem *parent)