]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Update the layout asynchronously when items are changed
authorPeter Penz <peter.penz19@gmail.com>
Fri, 23 Sep 2011 22:33:31 +0000 (00:33 +0200)
committerPeter Penz <peter.penz19@gmail.com>
Fri, 23 Sep 2011 22:35:26 +0000 (00:35 +0200)
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).

src/kitemviews/kitemlistview.cpp

index f15d1ed9d5ffb390c8b160316ec349c2cdd691ab..0a346b094bebfa17c3b4a1d8baf39ad5d78b1ae8 100644 (file)
@@ -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