Commit 5e5f236d authored by Méven Car's avatar Méven Car
Browse files

KFileItemModelRolesUpdater: Avoid refreshing items when we receive their content count

It concerns the detail view.

It can cause multiple preview to be generated for the same file.
This is visible for directories whose icons use a random value for their inner files thumbnails.

Only the view needs to be updated for this model change.
parent 0811bf4a
Pipeline #51663 passed with stage
in 6 minutes and 55 seconds
......@@ -782,7 +782,11 @@ void KFileItemModelRolesUpdater::slotDirectoryContentsCountReceived(const QStrin
data.insert("isExpandable", count > 0);
}
disconnect(m_model, &KFileItemModel::itemsChanged,
this, &KFileItemModelRolesUpdater::slotItemsChanged);
m_model->setData(index, data);
connect(m_model, &KFileItemModel::itemsChanged,
this, &KFileItemModelRolesUpdater::slotItemsChanged);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment