From 4917675529575873bcee70ef4d73007986130400 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 11 Jun 2021 14:37:24 +0100 Subject: [PATCH] Solitaire: Fix invisible cards when multiple are tab-moved at once Previously, pressing to auto-move cards would render all but the last one that moved invisible. Now they all render correctly. :^) --- Userland/Games/Solitaire/Game.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Userland/Games/Solitaire/Game.cpp b/Userland/Games/Solitaire/Game.cpp index 311cacd8c1..a23f1ef059 100644 --- a/Userland/Games/Solitaire/Game.cpp +++ b/Userland/Games/Solitaire/Game.cpp @@ -338,13 +338,12 @@ void Game::move_card(CardStack& from, CardStack& to) auto card = from.pop(); - card->set_moving(true); - m_focused_cards.clear(); - m_focused_cards.append(card); mark_intersecting_stacks_dirty(card); to.push(card); - remember_move_for_undo(from, to, m_focused_cards); + NonnullRefPtrVector moved_card; + moved_card.append(card); + remember_move_for_undo(from, to, moved_card); score_move(from, to);