[gnome-chess] Reset the selected piece upon undo
- From: Sahil Sareen <ssareen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] Reset the selected piece upon undo
- Date: Sat, 10 Jan 2015 18:44:29 +0000 (UTC)
commit 1f9239ec8c595fcc814a1bf86333d1112318146e
Author: Sahil Sareen <sahil sareen hotmail com>
Date: Sun Jan 11 00:13:03 2015 +0530
Reset the selected piece upon undo
The selected piece should be reset when the
player presses undo.
https://bugzilla.gnome.org/show_bug.cgi?id=734181
src/gnome-chess.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index dbe5275..65a3cd4 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -1484,6 +1484,10 @@ public class ChessApplication : Gtk.Application
public void undo_move_cb ()
{
+ // No piece should be selected now
+ scene.selected_rank = -1;
+ scene.selected_file = -1;
+
if (opponent != null)
human_player.undo ();
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]