From ef02e261ae4f71eee78123f798917c0a084960a4 Mon Sep 17 00:00:00 2001 From: Nikhil Marathe Date: Wed, 5 May 2010 13:51:00 +0000 Subject: [PATCH] Skip copying of tiles when there aren't any tiles svn path=/trunk/KDE/kdebase/workspace/; revision=1123171 --- tilinglayoutfactory.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tilinglayoutfactory.cpp b/tilinglayoutfactory.cpp index 5422ecf0e9..0155d0df5b 100644 --- a/tilinglayoutfactory.cpp +++ b/tilinglayoutfactory.cpp @@ -98,6 +98,10 @@ TilingLayout* TilingLayoutFactory::cycleLayout( TilingLayout *curr, bool next ) curr->removeTileNoArrange( t ); } + if( tiles.length() == 0 ) + return l; + + // so that we don't rearrange after every call Tile *last = tiles.takeLast(); foreach( Tile *t, tiles ) {