untranslated string comparison fixed (#3164)

This commit is contained in:
David Szabo 2018-04-03 05:04:52 +02:00 committed by Zach H
parent e1394bd851
commit 2fcb02cadd
2 changed files with 6 additions and 3 deletions

View file

@ -106,7 +106,10 @@ QVariant DeckListModel::data(const QModelIndex &index, int role) const
case 0: case 0:
return node->recursiveCount(true); return node->recursiveCount(true);
case 1: case 1:
return node->getVisibleName(); if (role == Qt::DisplayRole)
return node->getVisibleName();
else
return node->getName();
default: default:
return QVariant(); return QVariant();
} }

View file

@ -962,9 +962,9 @@ void TabDeckEditor::actSwapCard()
if (!gparent.isValid()) if (!gparent.isValid())
return; return;
const QString zoneName = gparent.sibling(gparent.row(), 1).data().toString(); const QString zoneName = gparent.sibling(gparent.row(), 1).data(Qt::EditRole).toString();
actDecrement(); actDecrement();
const QString otherZoneName = zoneName == "Maindeck" ? DECK_ZONE_SIDE : DECK_ZONE_MAIN; const QString otherZoneName = zoneName == DECK_ZONE_MAIN ? DECK_ZONE_SIDE : DECK_ZONE_MAIN;
// Third argument (true) says create the card no mater what, even if not in DB // Third argument (true) says create the card no mater what, even if not in DB
QModelIndex newCardIndex = deckModel->addCard(cardName, otherZoneName, true); QModelIndex newCardIndex = deckModel->addCard(cardName, otherZoneName, true);