Revert "[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve"

Sometimes causes the first thumbnail to not be loaded :/

This reverts commit 033eb6b3a3.
This commit is contained in:
Kai Uwe Broulik 2018-09-11 11:53:56 +02:00
parent 033eb6b3a3
commit b98948ae1e

View file

@ -1165,18 +1165,14 @@ QList<int> KFileItemModelRolesUpdater::indexesToResolve() const
// Add items on the last page.
const int beginLastPage = qMax(qMin(endExtendedVisibleRange + 1, count - 1), count - m_maximumVisibleItems);
if (beginLastPage < count - 1) {
for (int i = beginLastPage; i < count; ++i) {
result.append(i);
}
for (int i = beginLastPage; i < count; ++i) {
result.append(i);
}
// Add items on the first page.
const int endFirstPage = qMin(qMax(beginExtendedVisibleRange - 1, 0), m_maximumVisibleItems);
if (beginExtendedVisibleRange > 0) {
for (int i = 0; i <= endFirstPage; ++i) {
result.append(i);
}
for (int i = 0; i <= endFirstPage; ++i) {
result.append(i);
}
// Continue adding items until ResolveAllItemsLimit is reached.