mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 09:03:57 -07:00
[DLM] emit dataChanged when incrementing card amount
Took 5 minutes
This commit is contained in:
parent
ea956fc7f7
commit
7279d5f6b4
1 changed files with 4 additions and 0 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