mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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.
This commit is contained in:
parent
0811bf4a2b
commit
5e5f236d00
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue