mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-05 21:13:55 -07:00
fix cardInfoRequest
This commit is contained in:
parent
26319d69a6
commit
e2835c2e5a
2 changed files with 5 additions and 4 deletions
|
|
@ -222,10 +222,11 @@ void DeckEditorDatabaseDisplayWidget::databaseCustomMenu(QPoint point)
|
|||
} else {
|
||||
for (const CardRelation *rel : relatedCards) {
|
||||
const QString &relatedCardName = rel->getName();
|
||||
ExactCard exactCard = CardDatabaseManager::query()->getPreferredCard(relatedCardName);
|
||||
QAction *relatedCard = relatedMenu->addAction(relatedCardName);
|
||||
connect(relatedCard, &QAction::triggered, this,
|
||||
[this, exactCard] { emit cardInfoRequested(exactCard); });
|
||||
connect(relatedCard, &QAction::triggered, this, [this, relatedCardName] {
|
||||
ExactCard card = CardDatabaseManager::query()->guessCard({relatedCardName});
|
||||
emit cardInfoRequested(card);
|
||||
});
|
||||
}
|
||||
}
|
||||
menu.exec(databaseView->mapToGlobal(point));
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ signals:
|
|||
|
||||
void edhrecRequested(const CardInfoPtr &cardInfo, bool isCommander);
|
||||
void printingSelectorRequested();
|
||||
void cardInfoRequested(const ExactCard &cardName);
|
||||
void cardInfoRequested(const ExactCard &card);
|
||||
|
||||
private:
|
||||
KeySignals searchKeySignals;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue