[Replay] Fix cards accumulating in zone view when rewinding (#7357)

* [Replay] Fix cards accumulating in zone view when rewinding

* rename method
This commit is contained in:
RickyRister 2026-10-02 08:17:34 -07:00 • committed by GitHub
parent ecd955bc60
commit ffcb9094ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 31 additions and 3 deletions

View file

@ -154,6 +154,14 @@ void ZoneViewZoneLogic::removeCard(int position, bool toNewZone)
reorganizeCards();
}
void ZoneViewZoneLogic::clearCards()
{
for (auto card : cards) {
card->deleteLater();
}
cards.clear();
}
void ZoneViewZoneLogic::setWriteableRevealZone(bool _writeableRevealZone)
{

View file

@ -41,6 +41,10 @@ public:
bool prepareAddCard(int x);
void removeCard(int position, bool toNewZone);
void updateCardIds(CardAction action);
/** @brief Removes all cards from the view, without touching anything else. Used in replay rewind */
void clearCards();
int getNumberCards() const
{
return numberCards;