[gnome-games] chess: Redraw board when move undone (Bug: #644178)
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] chess: Redraw board when move undone (Bug: #644178)
- Date: Wed, 9 Mar 2011 00:40:57 +0000 (UTC)
commit 9f29bb0ca945c9f355db639ddb74011d7837916f
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Mar 9 11:40:50 2011 +1100
chess: Redraw board when move undone (Bug: #644178)
glchess/src/chess-scene.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/glchess/src/chess-scene.vala b/glchess/src/chess-scene.vala
index 7192215..7507b02 100644
--- a/glchess/src/chess-scene.vala
+++ b/glchess/src/chess-scene.vala
@@ -81,6 +81,7 @@ public class ChessScene : Object
selected_rank = -1;
selected_file = -1;
_game.moved.connect (moved_cb);
+ _game.undo.connect (undo_cb);
update_board ();
}
}
@@ -209,6 +210,11 @@ public class ChessScene : Object
{
update_board ();
}
+
+ private void undo_cb (ChessGame game)
+ {
+ update_board ();
+ }
private ChessModel? find_model (ChessPiece piece)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]