Delete a tile when it is removed.

removeTileNoArrange() deletes the tile, so removeTile() uses some other tile to attempt a rearrange. If we have no tiles, we don't need to rearrange anyway.

svn path=/trunk/KDE/kdebase/workspace/; revision=1150491
This commit is contained in:
Nikhil Marathe 2010-07-16 06:10:40 +00:00
parent aa89bef5c0
commit c02ac050c5

View file

@ -152,6 +152,8 @@ void TilingLayout::removeTileNoArrange( Tile * t )
return;
preRemoveTile( t );
m_tiles.removeOne( t );
delete t;
t = NULL;
}
const QRect TilingLayout::layoutArea( Tile *t ) const
@ -164,7 +166,8 @@ void TilingLayout::removeTile( Tile *t )
if( t == NULL )
return;
removeTileNoArrange( t );
arrange( layoutArea( t ) );
if( !m_tiles.empty() )
arrange( layoutArea( m_tiles.first() ) );
}
void TilingLayout::removeTile( Client *c )