[gnome-mahjongg/gnome-3-8] Fix Redo sometimes removing too many pieces
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mahjongg/gnome-3-8] Fix Redo sometimes removing too many pieces
- Date: Fri, 6 Sep 2013 21:01:31 +0000 (UTC)
commit 8b357b8713b4727e105df58bf76e3c8b75d5f80b
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Sep 6 15:55:28 2013 -0500
Fix Redo sometimes removing too many pieces
It was possible for an odd number of pieces to be removed from the board
when pressing Redo. Fix by Andreas König.
src/game.vala | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index ba54b7d..9e8e49c 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -353,6 +353,11 @@ public class Game
selected_tile = null;
set_hint (null, null);
+ /* You lose your re-do queue when you make a move */
+ foreach (var tile in tiles)
+ if (tile.move_number >= move_number)
+ tile.move_number = 0;
+
tile0.visible = false;
tile0.move_number = move_number;
tile1.visible = false;
@@ -363,11 +368,6 @@ public class Game
redraw_tile (tile0);
redraw_tile (tile1);
- /* You lose your re-do queue when you make a move */
- foreach (var tile in tiles)
- if (tile.move_number >= move_number)
- tile.move_number = 0;
-
if (complete)
stop_clock ();
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]