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:
Buce 2014-02-18 19:52:23 -06:00
parent b32374b453
commit 875df01424

View file

@ -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);
}
}