From: Peter Penz Date: Fri, 23 Sep 2011 22:33:31 +0000 (+0200) Subject: Update the layout asynchronously when items are changed X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/17624f0e05e73baed9f15a3ddaee32f9ca93580f?ds=inline Update the layout asynchronously when items are changed This results in less overhead if item-changes are done rather fast (e.g. when applying the number of sub directories for the "size" role). --- diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index f15d1ed9d..0a346b094 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -764,7 +764,9 @@ void KItemListView::slotItemsChanged(const KItemRangeList& itemRanges, if (updateSizeHints) { m_sizeHintResolver->itemsChanged(index, count, roles); m_layouter->markAsDirty(); - updateLayout(); + if (!m_layoutTimer->isActive()) { + m_layoutTimer->start(); + } } // Apply the changed roles to the visible item-widgets