Skip to content

Commit

Permalink
Don't try to draw icon for hidden color buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 20, 2014
1 parent fb2279f commit 2671d67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/qgscolorbuttonv2.cpp
Expand Up @@ -571,6 +571,11 @@ void QgsColorButtonV2::setButtonBackground( const QColor color )
#endif
}

if ( !currentIconSize.isValid() )
{
return;
}

//create an icon pixmap
QPixmap pixmap( currentIconSize );
pixmap.fill( Qt::transparent );
Expand Down

0 comments on commit 2671d67

Please sign in to comment.