mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -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 {
|
} else {
|
||||||
for (const CardRelation *rel : relatedCards) {
|
for (const CardRelation *rel : relatedCards) {
|
||||||
const QString &relatedCardName = rel->getName();
|
const QString &relatedCardName = rel->getName();
|
||||||
ExactCard exactCard = CardDatabaseManager::query()->getPreferredCard(relatedCardName);
|
|
||||||
QAction *relatedCard = relatedMenu->addAction(relatedCardName);
|
QAction *relatedCard = relatedMenu->addAction(relatedCardName);
|
||||||
connect(relatedCard, &QAction::triggered, this,
|
connect(relatedCard, &QAction::triggered, this, [this, relatedCardName] {
|
||||||
[this, exactCard] { emit cardInfoRequested(exactCard); });
|
ExactCard card = CardDatabaseManager::query()->guessCard({relatedCardName});
|
||||||
|
emit cardInfoRequested(card);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
menu.exec(databaseView->mapToGlobal(point));
|
menu.exec(databaseView->mapToGlobal(point));
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ signals:
|
||||||
|
|
||||||
void edhrecRequested(const CardInfoPtr &cardInfo, bool isCommander);
|
void edhrecRequested(const CardInfoPtr &cardInfo, bool isCommander);
|
||||||
void printingSelectorRequested();
|
void printingSelectorRequested();
|
||||||
void cardInfoRequested(const ExactCard &cardName);
|
void cardInfoRequested(const ExactCard &card);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KeySignals searchKeySignals;
|
KeySignals searchKeySignals;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue