mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
fixed issue #37: add option to manually add token cards to the database
This commit is contained in:
parent
d5a1032cf3
commit
3ba3952604
15 changed files with 434 additions and 93 deletions
|
|
@ -123,7 +123,7 @@ DlgCreateToken::DlgCreateToken(const QStringList &_predefinedTokens, QWidget *pa
|
|||
void DlgCreateToken::tokenSelectionChanged(const QModelIndex ¤t, const QModelIndex & /*previous*/)
|
||||
{
|
||||
const QModelIndex realIndex = cardDatabaseDisplayModel->mapToSource(current);
|
||||
const CardInfo *cardInfo = cardDatabaseModel->getCard(realIndex.row());
|
||||
const CardInfo *cardInfo = current.row() >= 0 ? cardDatabaseModel->getCard(realIndex.row()) : db->getCard();
|
||||
|
||||
nameEdit->setText(cardInfo->getName());
|
||||
const QString cardColor = cardInfo->getColors().isEmpty() ? QString() : (cardInfo->getColors().size() > 1 ? QString("m") : cardInfo->getColors().first());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue