Rearrange only when needed.

svn path=/trunk/KDE/kdebase/workspace/; revision=764700
This commit is contained in:
Luboš Luňák 2008-01-22 11:32:27 +00:00
parent bcb208a51d
commit 969c438d84

View file

@ -74,17 +74,18 @@ void ThumbnailAsideEffect::windowDamaged( EffectWindow* w, const QRect& )
} }
void ThumbnailAsideEffect::windowGeometryShapeChanged( EffectWindow* w, const QRect& old ) void ThumbnailAsideEffect::windowGeometryShapeChanged( EffectWindow* w, const QRect& old )
{
if( w->size() == old.size())
{ {
foreach( const Data& d, windows ) foreach( const Data& d, windows )
{ {
if( d.window == w ) if( d.window == w )
{
if( w->size() == old.size())
effects->addRepaint( d.rect ); effects->addRepaint( d.rect );
}
}
else else
arrange(); arrange();
return;
}
}
} }
void ThumbnailAsideEffect::windowClosed( EffectWindow* w ) void ThumbnailAsideEffect::windowClosed( EffectWindow* w )
@ -133,6 +134,8 @@ void ThumbnailAsideEffect::removeThumbnail( EffectWindow* w )
void ThumbnailAsideEffect::arrange() void ThumbnailAsideEffect::arrange()
{ {
if( windows.size() == 0 )
return;
int height = 0; int height = 0;
QVector< int > pos( windows.size()); QVector< int > pos( windows.size());
int mwidth = 0; int mwidth = 0;