Fix windows deck searching

This commit is contained in:
ZeldaZach 2025-01-31 22:30:17 -05:00
parent 33d8edeb9a
commit 4817089d04
No known key found for this signature in database

View file

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