From 8ee524d172efc1dcf6da439079d4e3c64026b9b9 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 10 Jan 2010 19:34:33 +0000 Subject: [PATCH] IconAction refuses to display and to be activated if the underlying QAction is invisible or disabled svn path=/trunk/KDE/kdelibs/; revision=1072708 --- widgets/iconwidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/widgets/iconwidget.cpp b/widgets/iconwidget.cpp index 5abc579fd..5098f1432 100644 --- a/widgets/iconwidget.cpp +++ b/widgets/iconwidget.cpp @@ -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;