void GenericLayout::resize( int width, int height )
{
- if( width == m_width && height == m_height )
- {
- return;
- }
-
// Check boundaries
if( width < m_minWidth )
{
height = m_maxHeight;
}
+ if( width == m_width && height == m_height )
+ {
+ return;
+ }
+
// Update the window size
m_width = width;
m_height = height;
list<LayeredControl>::const_iterator iter;
for( iter = m_controlList.begin(); iter != m_controlList.end(); iter++ )
{
- (*iter).m_pControl->onResize();
- const Position *pPos = (*iter).m_pControl->getPosition();
- if( pPos )
+ iter->m_pControl->onResize();
+ const Position *pPos = iter->m_pControl->getPosition();
+ if( pPos && iter->m_pControl->isVisible() )
{
- (*iter).m_pControl->draw( *m_pImage, pPos->getLeft(),
- pPos->getTop() );
+ iter->m_pControl->draw( *m_pImage, pPos->getLeft(),
+ pPos->getTop() );
}
}
{
CtrlGeneric *pCtrl = (*iter).m_pControl;
const Position *pPos = pCtrl->getPosition();
- if( pCtrl->isVisible() && pPos )
+ if( pPos && pCtrl->isVisible() )
{
pCtrl->draw( *m_pImage, pPos->getLeft(), pPos->getTop() );
// Remember the video control (we assume there is at most one video