mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
[VDE] Accurately represent card amounts (#6547)
This commit is contained in:
parent
5a274fdbed
commit
948ec9e042
5 changed files with 172 additions and 29 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue