mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03: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
|
|
@ -147,7 +147,7 @@ void ZoneViewZoneLogic::removeCard(int position, bool toNewZone)
|
|||
}
|
||||
|
||||
CardItem *card = cards.takeAt(position);
|
||||
card->deleteLater();
|
||||
card->getState()->deleteView();
|
||||
|
||||
// The toNewZone check is to prevent the view from auto-closing if the view contains only a single card and that
|
||||
// card gets dragged within the view.
|
||||
|
|
@ -165,7 +165,7 @@ void ZoneViewZoneLogic::removeCard(int position, bool toNewZone)
|
|||
void ZoneViewZoneLogic::clearCards()
|
||||
{
|
||||
for (auto card : cards) {
|
||||
card->deleteLater();
|
||||
card->getState()->deleteView();
|
||||
}
|
||||
cards.clear();
|
||||
emit cardCountChanged();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue