This fixes a regression brought by
ff74e967e9777ed821734077051f55ac84a173a5
Forcefully resizing only makes sense when layouts were designed to be similar
in size in the first place. Furthermore, it cuts off a larger layout if a
smaller one is first defined when loading a skin.
Ideally, the skins2 dtd should be extended for skins developers to explicitly
express whether two layouts are tightly-coupled or not, i.e should always be
kept the same size whatever the subsequent resizing performed by the user.
}
// The current layout becomes inactive
m_pActiveLayout->getActiveVar().set( false );
- pLayout->resize( m_pActiveLayout->getWidth(), m_pActiveLayout->getHeight() );
+
+ // if both layouts have the same original size, infer a
+ // subsequent resize of the active layout has to be applied
+ // to the new layout about to become active
+ if( pLayout->isTightlyCoupledWith( *m_pActiveLayout ) )
+ pLayout->resize( m_pActiveLayout->getWidth(),
+ m_pActiveLayout->getHeight() );
}
pLayout->setWindow( this );