[gnome-chess/gnome-3-36] chess-pgn: Remove the extra check while setting TimeControl tag



commit 8ddc4a5b6cc8337301998d9329e57280a950bbeb
Author: Amandeep Singh <newtodisworld gmail com>
Date:   Tue Jun 30 06:25:11 2020 +0000

    chess-pgn: Remove the extra check while setting TimeControl tag
    
    TimeControl tag should be set irrespective of whether WhiteTimeLeft
    or BlackTimeLeft tag has been set
    
    Closes #45
    
    
    (cherry picked from commit de1b15d6745f22ab413a8098dfae36dcf8bb1cbd)

 lib/chess-pgn.vala | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/lib/chess-pgn.vala b/lib/chess-pgn.vala
index aacb639..4e927a5 100644
--- a/lib/chess-pgn.vala
+++ b/lib/chess-pgn.vala
@@ -254,10 +254,7 @@ public class PGN : Object
             break;
         case "TimeControl":
             if (int64.try_parse (tag_value) == true)
-            {
-                if (game.tags["WhiteTimeLeft"] != null && game.tags["BlackTimeLeft"] != null)
-                    game.tags.insert (tag_name, tag_value);
-            }
+                game.tags.insert (tag_name, tag_value);
             else
                 warning (_("Invalid %s : %s in PGN, setting timer to infinity."), tag_name, tag_value);
             break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]