mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
some token code
This commit is contained in:
parent
1cd63375ba
commit
f553fd7456
15 changed files with 99 additions and 21 deletions
|
|
@ -437,13 +437,17 @@ void WndDeckEditor::recursiveExpand(const QModelIndex &index)
|
|||
deckView->expand(index);
|
||||
}
|
||||
|
||||
void WndDeckEditor::addCardHelper(const QString &zoneName)
|
||||
void WndDeckEditor::addCardHelper(QString zoneName)
|
||||
{
|
||||
const QModelIndex currentIndex = databaseView->selectionModel()->currentIndex();
|
||||
if (!currentIndex.isValid())
|
||||
return;
|
||||
const QString cardName = currentIndex.sibling(currentIndex.row(), 0).data().toString();
|
||||
|
||||
|
||||
CardInfo *info = db->getCard(cardName);
|
||||
if (info->getIsToken())
|
||||
zoneName = "tokens";
|
||||
|
||||
QModelIndex newCardIndex = deckModel->addCard(cardName, zoneName);
|
||||
recursiveExpand(newCardIndex);
|
||||
deckView->setCurrentIndex(newCardIndex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue