mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 01:23: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"));
|
cardNode->setCardProviderId(printingInfo.getProperty("uuid"));
|
||||||
deckList->refreshDeckHash();
|
deckList->refreshDeckHash();
|
||||||
emit deckHashChanged();
|
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);
|
sort(lastKnownColumn, lastKnownOrder);
|
||||||
refreshCardFormatLegalities();
|
refreshCardFormatLegalities();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue