mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
[DeckListModel] Correctly refresh legality on add card (#6537)
This commit is contained in:
parent
2e1a0bec93
commit
8d274c1924
1 changed files with 3 additions and 3 deletions
|
|
@ -435,9 +435,8 @@ QModelIndex DeckListModel::addCard(const ExactCard &card, const QString &zoneNam
|
|||
// Determine the correct index
|
||||
int insertRow = findSortedInsertRow(groupNode, cardInfo);
|
||||
|
||||
auto *decklistCard =
|
||||
deckList->addCard(cardInfo->getName(), zoneName, insertRow, cardSetName, printingInfo.getProperty("num"),
|
||||
printingInfo.getProperty("uuid"), cardInfo->isLegalInFormat(deckList->getGameFormat()));
|
||||
auto *decklistCard = deckList->addCard(cardInfo->getName(), zoneName, insertRow, cardSetName,
|
||||
printingInfo.getProperty("num"), printingInfo.getProperty("uuid"));
|
||||
|
||||
beginInsertRows(parentIndex, insertRow, insertRow);
|
||||
cardNode = new DecklistModelCardNode(decklistCard, groupNode, insertRow);
|
||||
|
|
@ -453,6 +452,7 @@ QModelIndex DeckListModel::addCard(const ExactCard &card, const QString &zoneNam
|
|||
emit deckHashChanged();
|
||||
}
|
||||
sort(lastKnownColumn, lastKnownOrder);
|
||||
refreshCardFormatLegalities();
|
||||
emitRecursiveUpdates(parentIndex);
|
||||
auto index = nodeToIndex(cardNode);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue