Fix windows deck searching (#5536)

This commit is contained in:
Zach H 2025-01-31 23:13:46 -05:00 committed by GitHub
parent 34e0130b90
commit b956fd4bac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -179,7 +179,8 @@ void CardDatabaseDisplayModel::fetchMore(const QModelIndex &index)
return;
}
beginInsertRows(QModelIndex(), loadedRowCount, loadedRowCount + itemsToFetch - 1);
const auto startIndex = qMin(rowCount(QModelIndex()), loadedRowCount);
beginInsertRows(QModelIndex(), startIndex, startIndex + itemsToFetch - 1);
loadedRowCount += itemsToFetch;
endInsertRows();