From 8ee447b71809604c45dcdd051f68e80b904d4ba9 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Sat, 12 Jun 2021 19:33:11 +0100 Subject: [PATCH] Solitaire: Prevent undo when the game is over --- Userland/Games/Solitaire/Game.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Games/Solitaire/Game.cpp b/Userland/Games/Solitaire/Game.cpp index 45e23c0642..809bfa70bc 100644 --- a/Userland/Games/Solitaire/Game.cpp +++ b/Userland/Games/Solitaire/Game.cpp @@ -78,6 +78,10 @@ void Game::start_game_over_animation() if (m_game_over_animation) return; + m_last_move = {}; + if (on_undo_availability_change) + on_undo_availability_change(false); + create_new_animation_card(); // We wait one frame, to make sure that the foundation stacks are repainted before we start.