backport IconAction visibility fix

svn path=/branches/KDE/4.4/kdelibs/; revision=1072709
This commit is contained in:
Marco Martin 2010-01-10 19:35:58 +00:00
parent a06f77b764
commit c337423b66

View File

@ -225,6 +225,10 @@ void IconAction::rebuildPixmap()
bool IconAction::event(QEvent::Type type, const QPointF &pos)
{
if (!m_action->isVisible() || !m_action->isEnabled()) {
return false;
}
if (m_icon->size().width() < m_rect.width() * 2.0 ||
m_icon->size().height() < m_rect.height() * 2.0) {
return false;
@ -289,6 +293,10 @@ QAction *IconAction::action() const
void IconAction::paint(QPainter *painter) const
{
if (!m_action->isVisible() || !m_action->isEnabled()) {
return;
}
if (m_icon->size().width() < m_rect.width() * 2.0 ||
m_icon->size().height() < m_rect.height() * 2.0) {
return;