modellist: emit dataChanged on the correct index

dataChanged will not work correctly if we emit it on an old index after
sorting.

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
Jared Van Bortel 2024-10-04 18:49:43 -04:00
parent 348c0515d8
commit 3cfcb2a4d6

View File

@ -1010,10 +1010,10 @@ void ModelList::updateDataInternal(const QString &id, const QVector<QPair<int, Q
lock.unlock();
emit dataChanged(createIndex(index, 0), createIndex(index, 0));
if (shouldSort)
resortModel();
emit dataChanged(createIndex(index, 0), createIndex(index, 0));
emit selectableModelListChanged();
if (relock)