diff --git a/cockatrice/src/interface/widgets/cards/card_info_display_widget.cpp b/cockatrice/src/interface/widgets/cards/card_info_display_widget.cpp index b13a085bd..819bc57d0 100644 --- a/cockatrice/src/interface/widgets/cards/card_info_display_widget.cpp +++ b/cockatrice/src/interface/widgets/cards/card_info_display_widget.cpp @@ -49,7 +49,7 @@ void CardInfoDisplayWidget::setCard(const ExactCard &card) if (exactCard) connect(exactCard.getCardPtr().data(), &QObject::destroyed, this, &CardInfoDisplayWidget::clear); - text->setCard(exactCard.getCardPtr()); + text->setCard(exactCard); pic->setCard(exactCard); } diff --git a/cockatrice/src/interface/widgets/cards/card_info_frame_widget.cpp b/cockatrice/src/interface/widgets/cards/card_info_frame_widget.cpp index 829292b53..21bee8f54 100644 --- a/cockatrice/src/interface/widgets/cards/card_info_frame_widget.cpp +++ b/cockatrice/src/interface/widgets/cards/card_info_frame_widget.cpp @@ -154,7 +154,7 @@ void CardInfoFrameWidget::setCard(const ExactCard &card) setViewTransformationButtonVisibility(hasTransformation(exactCard.getInfo())); - text->setCard(exactCard.getCardPtr()); + text->setCard(exactCard); pic->setCard(exactCard); } diff --git a/cockatrice/src/interface/widgets/cards/card_info_text_widget.cpp b/cockatrice/src/interface/widgets/cards/card_info_text_widget.cpp index 775f6fb9e..456e1533a 100644 --- a/cockatrice/src/interface/widgets/cards/card_info_text_widget.cpp +++ b/cockatrice/src/interface/widgets/cards/card_info_text_widget.cpp @@ -50,8 +50,9 @@ void CardInfoTextWidget::setTexts(const QString &propsText, const QString &textT textLabel->setText(textText); } -void CardInfoTextWidget::setCard(CardInfoPtr card) +void CardInfoTextWidget::setCard(const ExactCard &exactCard) { + auto card = exactCard.getCardPtr(); if (card == nullptr) { setTexts("", ""); return; @@ -61,6 +62,15 @@ void CardInfoTextWidget::setCard(CardInfoPtr card) text += QString("