[DLM] emit dataChanged when incrementing card amount

Took 5 minutes
This commit is contained in:
Lukas Brübach 2026-01-23 09:35:24 +01:00
parent ea956fc7f7
commit 7279d5f6b4

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();