diff --git a/cockatrice/src/client/tabs/tab_game.cpp b/cockatrice/src/client/tabs/tab_game.cpp index 68c60ff15..a37e05567 100644 --- a/cockatrice/src/client/tabs/tab_game.cpp +++ b/cockatrice/src/client/tabs/tab_game.cpp @@ -648,8 +648,7 @@ void TabGame::replayRewind() messageLog->clearChat(); // reset phase markers - currentPhase = -1; - phasesToolbar->reset(); + setActivePhase(-1); } void TabGame::incrementGameTime() diff --git a/cockatrice/src/client/ui/phases_toolbar.cpp b/cockatrice/src/client/ui/phases_toolbar.cpp index f43d9f00d..036a7c19e 100644 --- a/cockatrice/src/client/ui/phases_toolbar.cpp +++ b/cockatrice/src/client/ui/phases_toolbar.cpp @@ -86,23 +86,6 @@ void PhaseButton::updateAnimation() update(); } -/** - * @brief Immediately resets the button to the inactive state, without going through the animation. - */ -void PhaseButton::reset() -{ - activeAnimationTimer->stop(); - active = false; - - if (highlightable) { - activeAnimationCounter = 0; - } else { - activeAnimationCounter = 9; - } - - update(); -} - void PhaseButton::mousePressEvent(QGraphicsSceneMouseEvent * /*event*/) { emit clicked(); @@ -268,16 +251,6 @@ void PhasesToolbar::phaseButtonClicked() emit sendGameCommand(cmd, -1); } -/** - * @brief Immediately resets the toolbar to its initial state, with all phases inactive. - */ -void PhasesToolbar::reset() -{ - for (auto &i : buttonList) { - i->reset(); - } -} - void PhasesToolbar::actNextTurn() { emit sendGameCommand(Command_NextTurn(), -1); diff --git a/cockatrice/src/client/ui/phases_toolbar.h b/cockatrice/src/client/ui/phases_toolbar.h index 1595c65d5..3567e741b 100644 --- a/cockatrice/src/client/ui/phases_toolbar.h +++ b/cockatrice/src/client/ui/phases_toolbar.h @@ -45,7 +45,6 @@ public: { return active; } - void reset(); void triggerDoubleClickAction(); signals: void clicked(); @@ -86,7 +85,6 @@ public: public slots: void setActivePhase(int phase); void triggerPhaseAction(int phase); - void reset(); private slots: void phaseButtonClicked(); void actNextTurn();