Fix multiple "Selected Cards" in Menu on MacOS (#5288)

This commit is contained in:
Zach H 2024-12-21 23:33:09 -05:00 committed by GitHub
parent 07ee271478
commit e1ba39c437
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3970,9 +3970,11 @@ void Player::setCardMenu(QMenu *menu)
{ {
if (aCardMenu != nullptr) { if (aCardMenu != nullptr) {
aCardMenu->setEnabled(menu != nullptr); aCardMenu->setEnabled(menu != nullptr);
if (menu) {
aCardMenu->setMenu(menu); aCardMenu->setMenu(menu);
} }
} }
}
QMenu *Player::getCardMenu() const QMenu *Player::getCardMenu() const
{ {