mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-29 01:53:54 -07:00
Keep card annotations on stack (#5399)
This commit is contained in:
parent
b2a8748bc6
commit
6e1047032d
6 changed files with 12 additions and 8 deletions
|
|
@ -217,13 +217,15 @@ void CardItem::setAttachedTo(CardItem *_attachedTo)
|
|||
}
|
||||
}
|
||||
|
||||
void CardItem::resetState()
|
||||
void CardItem::resetState(bool keepAnnotations)
|
||||
{
|
||||
attacking = false;
|
||||
facedown = false;
|
||||
counters.clear();
|
||||
pt.clear();
|
||||
annotation.clear();
|
||||
if (!keepAnnotations) {
|
||||
annotation.clear();
|
||||
}
|
||||
attachedTo = 0;
|
||||
attachedCards.clear();
|
||||
setTapped(false, false);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public:
|
|||
{
|
||||
return attachedCards;
|
||||
}
|
||||
void resetState();
|
||||
void resetState(bool keepAnnotations = false);
|
||||
void processCardInfo(const ServerInfo_Card &_info);
|
||||
|
||||
QMenu *getCardMenu() const
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ void StackZone::addCardImpl(CardItem *card, int x, int /*y*/)
|
|||
card->setName();
|
||||
}
|
||||
card->setParentItem(this);
|
||||
card->resetState();
|
||||
card->resetState(true);
|
||||
card->setVisible(true);
|
||||
card->update();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue