1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 06:07:35 +00:00

Solitaire: Fix invisible cards when multiple are tab-moved at once

Previously, pressing <tab> to auto-move cards would render all but
the last one that moved invisible. Now they all render correctly.
:^)
This commit is contained in:
Sam Atkins 2021-06-11 14:37:24 +01:00 committed by Andreas Kling
parent f0dcf79116
commit 4917675529

View file

@ -338,13 +338,12 @@ void Game::move_card(CardStack& from, CardStack& to)
auto card = from.pop(); auto card = from.pop();
card->set_moving(true);
m_focused_cards.clear();
m_focused_cards.append(card);
mark_intersecting_stacks_dirty(card); mark_intersecting_stacks_dirty(card);
to.push(card); to.push(card);
remember_move_for_undo(from, to, m_focused_cards); NonnullRefPtrVector<Card> moved_card;
moved_card.append(card);
remember_move_for_undo(from, to, moved_card);
score_move(from, to); score_move(from, to);