mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
Fix annoying popups on start
This commit is contained in:
parent
dad1aea128
commit
831b63a4b1
1 changed files with 4 additions and 0 deletions
|
|
@ -174,6 +174,10 @@ void CardDatabaseDisplayModel::fetchMore(const QModelIndex &index)
|
||||||
int remainder = sourceModel()->rowCount(index) - loadedRowCount;
|
int remainder = sourceModel()->rowCount(index) - loadedRowCount;
|
||||||
int itemsToFetch = qMin(100, remainder);
|
int itemsToFetch = qMin(100, remainder);
|
||||||
|
|
||||||
|
if (itemsToFetch == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
beginInsertRows(QModelIndex(), loadedRowCount, loadedRowCount + itemsToFetch - 1);
|
beginInsertRows(QModelIndex(), loadedRowCount, loadedRowCount + itemsToFetch - 1);
|
||||||
|
|
||||||
loadedRowCount += itemsToFetch;
|
loadedRowCount += itemsToFetch;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue