IconAction refuses to display and to be activated if the underlying QAction is invisible or disabled
svn path=/trunk/KDE/kdelibs/; revision=1072708
This commit is contained in:
parent
1aac8cb293
commit
8ee524d172
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user