mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 08:14:47 -07:00
Fix crash on replay list sorting, fix error popups on win debug (#5388)
* Fix annoying popups on start * Fix replay list item parent index calculation #5311 --------- Co-authored-by: Jakub Mrowinski <ryder052@outlook.com>
This commit is contained in:
parent
cfaadc40b1
commit
6e02bdec2e
2 changed files with 5 additions and 1 deletions
|
|
@ -174,6 +174,10 @@ void CardDatabaseDisplayModel::fetchMore(const QModelIndex &index)
|
|||
int remainder = sourceModel()->rowCount(index) - loadedRowCount;
|
||||
int itemsToFetch = qMin(100, remainder);
|
||||
|
||||
if (itemsToFetch == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
beginInsertRows(QModelIndex(), loadedRowCount, loadedRowCount + itemsToFetch - 1);
|
||||
|
||||
loadedRowCount += itemsToFetch;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue