From 7279d5f6b4ba36dcefbb06e6b9aeadcb3ee8906a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 23 Jan 2026 09:35:24 +0100 Subject: [PATCH] [DLM] emit dataChanged when incrementing card amount Took 5 minutes --- .../libcockatrice/models/deck_list/deck_list_model.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp b/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp index 8459f306c..f290c3743 100644 --- a/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp +++ b/libcockatrice_models/libcockatrice/models/deck_list/deck_list_model.cpp @@ -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();