]> git.sesse.net Git - vlc/commitdiff
skins2: don't draw control if non visible at initialisation
authorErwan Tulou <erwan10@videolan.org>
Tue, 29 Dec 2009 13:49:45 +0000 (14:49 +0100)
committerErwan Tulou <erwan10@videolan.org>
Tue, 29 Dec 2009 17:36:54 +0000 (18:36 +0100)
modules/gui/skins2/src/generic_layout.cpp

index 97bb03ce4d269c01b16b90db7f144dd1d176c133..00edb2d8acf7380c6a568ddba127b4caffd29e76 100644 (file)
@@ -101,7 +101,8 @@ void GenericLayout::addControl( CtrlGeneric *pControl,
         pControl->setLayout( this, rPosition );
 
         // Draw the control
-        pControl->draw( *m_pImage, rPosition.getLeft(), rPosition.getTop() );
+        if( pControl->isVisible() )
+            pControl->draw( *m_pImage, rPosition.getLeft(), rPosition.getTop() );
 
         // Add the control in the list.
         // This list must remain sorted by layer order