From 2525c1380eaeec5f74241833babdec433fb05ca9 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Mon, 19 Jan 2026 00:39:57 -0800 Subject: [PATCH] [DeckListModel] Correctly refresh legality on add card --- .../libcockatrice/models/deck_list/deck_list_model.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp b/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp index aa95b444e..8f987e6a9 100644 --- a/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp +++ b/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp @@ -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);