mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-17 23:35:50 -08:00
Fix GUI glitches when adding cards to a deck
Since we no longer sort on just card names, we need to emit updates for the parent of the card we add.
This commit is contained in:
@@ -256,11 +256,11 @@ QModelIndex DeckListModel::addCard(const QString &cardName, const QString &zoneN
|
||||
return nodeToIndex(cardNode);
|
||||
} else {
|
||||
cardNode->setNumber(cardNode->getNumber() + 1);
|
||||
QModelIndex ind = nodeToIndex(cardNode);
|
||||
QModelIndex parentIndex = nodeToIndex(cardTypeNode);
|
||||
sort(lastKnownColumn, lastKnownOrder);
|
||||
emitRecursiveUpdates(ind);
|
||||
emitRecursiveUpdates(parentIndex);
|
||||
deckList->updateDeckHash();
|
||||
return ind;
|
||||
return nodeToIndex(cardNode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user