mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
delete TabGame::updateCardMenu
This commit is contained in:
parent
a433ce3082
commit
32d13062ff
3 changed files with 1 additions and 19 deletions
|
|
@ -1218,23 +1218,6 @@ Player *TabGame::getActiveLocalPlayer() const
|
|||
void TabGame::setActiveCard(CardItem *card)
|
||||
{
|
||||
activeCard = card;
|
||||
updateCardMenu(card);
|
||||
}
|
||||
|
||||
void TabGame::updateCardMenu(AbstractCardItem *card)
|
||||
{
|
||||
if (card == nullptr) {
|
||||
return;
|
||||
}
|
||||
Player *player;
|
||||
if ((clients.size() > 1) || !players.contains(localPlayerId)) {
|
||||
player = card->getOwner();
|
||||
} else {
|
||||
player = players.value(localPlayerId);
|
||||
}
|
||||
if (player != nullptr) {
|
||||
player->updateCardMenu(static_cast<CardItem *>(card));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -172,7 +172,6 @@ private slots:
|
|||
void incrementGameTime();
|
||||
void adminLockChanged(bool lock);
|
||||
void newCardAdded(AbstractCardItem *card);
|
||||
void updateCardMenu(AbstractCardItem *card);
|
||||
void setCardMenu(QMenu *menu);
|
||||
|
||||
void actGameInfo();
|
||||
|
|
|
|||
|
|
@ -466,8 +466,8 @@ QVariant CardItem::itemChange(GraphicsItemChange change, const QVariant &value)
|
|||
{
|
||||
if ((change == ItemSelectedHasChanged) && owner != nullptr) {
|
||||
if (value == true) {
|
||||
owner->updateCardMenu(this);
|
||||
owner->getGame()->setActiveCard(this);
|
||||
owner->updateCardMenu(this);
|
||||
}
|
||||
}
|
||||
return AbstractCardItem::itemChange(change, value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue