fix merge issues

This commit is contained in:
Zach H 2015-12-30 11:54:30 -05:00
commit e0a25e74ac
2 changed files with 12 additions and 2 deletions

View file

@ -660,7 +660,12 @@ void CardDatabase::refreshCachedReverseRelatedCards()
if(card->getReverseRelatedCards().isEmpty()) if(card->getReverseRelatedCards().isEmpty())
continue; continue;
QString relatedCardName = card->getName(); QString relatedCardName;
if (card->getPowTough().size() > 0)
relatedCardName = card->getPowTough() + " " + card->getName(); // "n/n name"
else
relatedCardName = card->getName(); // "name"
foreach(QString targetCard, card->getReverseRelatedCards()) foreach(QString targetCard, card->getReverseRelatedCards())
{ {
if (!cards.contains(targetCard)) if (!cards.contains(targetCard))

View file

@ -1135,7 +1135,12 @@ void Player::actCreateRelatedCard()
// get the target card name // get the target card name
QAction *action = static_cast<QAction *>(sender()); QAction *action = static_cast<QAction *>(sender());
CardInfo *cardInfo = db->getCard(action->text());
// removes p/t from tokens (and leading space))
QStringList spaces = action->text().split(" ");
if (spaces.at(0).indexOf("/") != -1) // Strip space from creatures
spaces.removeFirst();
CardInfo *cardInfo = db->getCard(spaces.join(" "));
// get the target token's location // get the target token's location
// TODO: Define this QPoint into its own function along with the one below // TODO: Define this QPoint into its own function along with the one below