mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-20 17:32:15 -07:00
Calculate deck hashes lazily
This commit is contained in:
parent
badfb483b2
commit
9fd67f621b
3 changed files with 43 additions and 21 deletions
|
|
@ -262,7 +262,7 @@ bool DeckListModel::setData(const QModelIndex &index, const QVariant &value, con
|
|||
}
|
||||
|
||||
emitRecursiveUpdates(index);
|
||||
deckList->updateDeckHash();
|
||||
deckList->refreshDeckHash();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ QModelIndex DeckListModel::addCard(const QString &cardName,
|
|||
cardNode->setCardSetShortName(cardSetName);
|
||||
cardNode->setCardCollectorNumber(cardInfoSet.getProperty("num"));
|
||||
cardNode->setCardProviderId(cardInfoSet.getProperty("uuid"));
|
||||
deckList->updateDeckHash();
|
||||
deckList->refreshDeckHash();
|
||||
}
|
||||
sort(lastKnownColumn, lastKnownOrder);
|
||||
emitRecursiveUpdates(parentIndex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue