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:
parent
b32374b453
commit
875df01424
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue