mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-09 11:33:25 -08:00
[Refactor] Move the attachment graph and card view teardown onto CardState
This commit is contained in:
parent
cea80b0898
commit
dd04eed6d2
7 changed files with 54 additions and 19 deletions
|
|
@ -13,11 +13,17 @@ void CardState::resetState(bool keepAnnotations)
|
|||
annotation.clear();
|
||||
}
|
||||
attachedTo = nullptr;
|
||||
attachedCards.clear();
|
||||
setTapped(false, false);
|
||||
setDoesntUntap(false);
|
||||
emit stateReset();
|
||||
}
|
||||
|
||||
void CardState::deleteView()
|
||||
{
|
||||
emit viewDeleteRequested();
|
||||
}
|
||||
|
||||
void CardState::setCardRef(const CardRef &_cardRef)
|
||||
{
|
||||
if (cardRef == _cardRef) {
|
||||
|
|
@ -188,7 +194,7 @@ void CardState::setDestroyOnZoneChange(bool _destroyOnZoneChange)
|
|||
emit stateChanged();
|
||||
}
|
||||
|
||||
void CardState::setAttachedTo(CardItem *_attachedTo)
|
||||
void CardState::setAttachedTo(CardState *_attachedTo)
|
||||
{
|
||||
if (attachedTo == _attachedTo) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue