From ff36acb2ad7854f1e48cb33033e0a803a4f2d5c2 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Mon, 19 May 2008 16:07:49 +0000 Subject: [PATCH] Disable updates when loading new items. This improves performance because setExpanded() doesn't need to do a relayout. CCIRC: till svn path=/trunk/KDE/kdepim/; revision=809831 --- folderselectiontreewidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/folderselectiontreewidget.cpp b/folderselectiontreewidget.cpp index 8b9a91540..77f5350df 100644 --- a/folderselectiontreewidget.cpp +++ b/folderselectiontreewidget.cpp @@ -130,12 +130,14 @@ void FolderSelectionTreeWidget::reload( bool mustBeReadWrite, bool showOutbox, mFilter = QString(); + setUpdatesEnabled( false ); for ( KMFolderTreeItem * fti = static_cast( mFolderTree->firstChild() ) ; fti; fti = static_cast( fti->nextSibling() ) ) recursiveReload( fti, 0 ); + setUpdatesEnabled( true ); if ( preSelection.isEmpty() ) return; // nothing more to do