mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-07-18 09:21:29 +00:00
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:
parent
348c0515d8
commit
3cfcb2a4d6
@ -1010,10 +1010,10 @@ void ModelList::updateDataInternal(const QString &id, const QVector<QPair<int, Q
|
|||||||
|
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
||||||
|
emit dataChanged(createIndex(index, 0), createIndex(index, 0));
|
||||||
if (shouldSort)
|
if (shouldSort)
|
||||||
resortModel();
|
resortModel();
|
||||||
|
|
||||||
emit dataChanged(createIndex(index, 0), createIndex(index, 0));
|
|
||||||
emit selectableModelListChanged();
|
emit selectableModelListChanged();
|
||||||
|
|
||||||
if (relock)
|
if (relock)
|
||||||
|
Loading…
Reference in New Issue
Block a user