Skip to content

Commit

Permalink
Fix related cards popup (#3613)
Browse files Browse the repository at this point in the history
  • Loading branch information
basicer authored and ZeldaZach committed Mar 4, 2019
1 parent 440311c commit 55c4207
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions cockatrice/src/carddatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ class CardInfo : public QObject
{
return reverseRelatedCardsToMe;
}
const QList<CardRelation *> getAllRelatedCards() const
{
QList<CardRelation *> result;
result.append(getRelatedCards());
result.append(getReverseRelatedCards2Me());
return result;
}
void resetReverseRelatedCards2Me();
void addReverseRelatedCards2Me(CardRelation *cardRelation)
{
Expand Down
4 changes: 2 additions & 2 deletions cockatrice/src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 55c4207

Please sign in to comment.