From 151c8d8c42115717151d88e17b55b60a74b5e791 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Mon, 22 Apr 2013 21:21:31 +0200 Subject: Always determine icons for the visible items first When entering a folder, KFileItemModelRolesUpdater has not yet been informed about the visible index range by the view when it tries to determine icons synchronously. This resulted in the problem that it tried to determine icons for all items in random order, and some visible icons were somtimes still unknown after the "synchronous icon loading" timeout of 200 ms. This commit tries to improve the situation by loading icons starting with the first item in increasing order. This should make it less likely that some visible items still have unknown icons after 200 ms. BUG: 316129 FIXED-IN: 4.10.3 REVIEW: 109843 --- src/kitemviews/kfileitemlistview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/kitemviews/kfileitemlistview.cpp') diff --git a/src/kitemviews/kfileitemlistview.cpp b/src/kitemviews/kfileitemlistview.cpp index b7f7455b4..70ce11b1f 100644 --- a/src/kitemviews/kfileitemlistview.cpp +++ b/src/kitemviews/kfileitemlistview.cpp @@ -323,6 +323,7 @@ void KFileItemListView::updateVisibleIndexRange() const int index = firstVisibleIndex(); const int count = lastVisibleIndex() - index + 1; + m_modelRolesUpdater->setMaximumVisibleItems(maximumVisibleItems()); m_modelRolesUpdater->setVisibleIndexRange(index, count); if (m_updateIconSizeTimer->isActive()) { -- cgit v1.3