[VDE] Accurately represent card amounts (#6547)

This commit is contained in:
BruebachL 2026-01-23 14:47:08 +01:00 committed by GitHub
parent 5a274fdbed
commit 948ec9e042
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 172 additions and 29 deletions

View file

@ -450,6 +450,10 @@ QModelIndex DeckListModel::addCard(const ExactCard &card, const QString &zoneNam
cardNode->setCardProviderId(printingInfo.getProperty("uuid"));
deckList->refreshDeckHash();
emit deckHashChanged();
// Emit dataChanged for the amount column since we modified it
QModelIndex cardIndex = nodeToIndex(cardNode);
QModelIndex amountIndex = cardIndex.sibling(cardIndex.row(), DeckListModelColumns::CARD_AMOUNT);
emit dataChanged(amountIndex, amountIndex, {Qt::EditRole});
}
sort(lastKnownColumn, lastKnownOrder);
refreshCardFormatLegalities();