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
|
|
@ -251,7 +251,7 @@ void PlayerLogic::deleteCard(CardItem *card)
|
|||
} else if (dialogSemaphore) {
|
||||
cardsToDelete.append(card);
|
||||
} else {
|
||||
card->deleteLater();
|
||||
card->getState()->deleteView();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -332,7 +332,7 @@ bool PlayerLogic::clearCardsToDelete()
|
|||
|
||||
for (auto &i : cardsToDelete) {
|
||||
if (i != nullptr) {
|
||||
i->deleteLater();
|
||||
i->getState()->deleteView();
|
||||
}
|
||||
}
|
||||
cardsToDelete.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue