mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 10:33:24 -08:00
[Refactor] Move the attachment graph and card view teardown onto CardState (#7428)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
47c90cda10
commit
2335e064ac
7 changed files with 54 additions and 19 deletions
|
|
@ -14,11 +14,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) {
|
||||
|
|
@ -189,7 +195,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