do not paint buttons (from parent) if hidden.

This commit is contained in:
Hugo Pereira Da Costa 2011-09-23 15:46:29 +02:00
parent c9ed76be6f
commit f435f716b8

View file

@ -1414,7 +1414,7 @@ namespace Oxygen
QList<Button*> buttons( widget()->findChildren<Button*>() ); QList<Button*> buttons( widget()->findChildren<Button*>() );
foreach( Button* button, buttons ) foreach( Button* button, buttons )
{ {
if( event->rect().intersects( button->geometry() ) ) if( button->isVisible() && event->rect().intersects( button->geometry() ) )
{ {
painter.save(); painter.save();
painter.setViewport( button->geometry() ); painter.setViewport( button->geometry() );