[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

@ -735,6 +735,16 @@ void GameScene::clearViews()
}
}
void GameScene::emptyActiveViews()
{
for (auto zoneView : zoneViews) {
auto logic = qobject_cast<ZoneViewZoneLogic *>(zoneView->getZone()->getLogic());
if (!logic->getRevealZone()) {
logic->clearCards();
}
}
}
/**
* @brief Closes the most recently added zone view.
*/

View file

@ -227,6 +227,9 @@ public slots:
/** @brief Closes all zone views. */
void clearViews();
/** @brief Empties the contents of all non-reveal zone views. Used for replay rewinding */
void emptyActiveViews();
/** @brief Closes the most recently added zone view. */
void closeMostRecentZoneView();
QTransform getViewTransform() const;