Fix related cards popup (#3613)

This commit is contained in:
Rob Blanckaert 2019-03-03 23:19:37 -08:00 committed by Zach H
parent 440311c939
commit 55c4207182
2 changed files with 9 additions and 2 deletions

View file

@ -287,6 +287,13 @@ public:
{
return reverseRelatedCardsToMe;
}
const QList<CardRelation *> getAllRelatedCards() const
{
QList<CardRelation *> result;
result.append(getRelatedCards());
result.append(getReverseRelatedCards2Me());
return result;
}
void resetReverseRelatedCards2Me();
void addReverseRelatedCards2Me(CardRelation *cardRelation)
{

View file

@ -3065,7 +3065,7 @@ void Player::addRelatedCardView(const CardItem *card, QMenu *cardMenu)
return;
}
QList<CardRelation *> relatedCards = cardInfo->getRelatedCards();
QList<CardRelation *> relatedCards = cardInfo->getAllRelatedCards();
if (relatedCards.isEmpty()) {
return;
}
@ -3092,7 +3092,7 @@ void Player::addRelatedCardActions(const CardItem *card, QMenu *cardMenu)
return;
}
QList<CardRelation *> relatedCards = cardInfo->getRelatedCards();
QList<CardRelation *> relatedCards = cardInfo->getAllRelatedCards();
if (relatedCards.isEmpty()) {
return;
}