diff --git a/katrain/config.json b/katrain/config.json index 5833713..2354c24 100644 --- a/katrain/config.json +++ b/katrain/config.json @@ -17,7 +17,7 @@ "anim_pv_time": 0.5, "debug_level": 0, "lang": "en", - "version": "1.7.0" + "version": "1.7.1" }, "timer": { "byo_length": 30, diff --git a/katrain/core/constants.py b/katrain/core/constants.py index a7d2a99..c955d03 100644 --- a/katrain/core/constants.py +++ b/katrain/core/constants.py @@ -1,5 +1,5 @@ PROGRAM_NAME = "KaTrain" -VERSION = "1.7.0" +VERSION = "1.7.1" HOMEPAGE = "https://github.com/sanderland/katrain" CONFIG_MIN_VERSION = "1.7.0" # keep config files from this version ANALYSIS_FORMAT_VERSION = "1.0" diff --git a/katrain/core/game.py b/katrain/core/game.py index e71662f..591ed04 100644 --- a/katrain/core/game.py +++ b/katrain/core/game.py @@ -67,7 +67,7 @@ class Game: self.root = move_tree self.external_game = PROGRAM_NAME not in self.root.get_property("AP", "") self.komi = self.root.komi - handicap = int(self.root.get_property("HA", 0)) + handicap = int(self.root.handicap) if ( handicap >= 2 and not self.root.placements diff --git a/katrain/core/sgf_parser.py b/katrain/core/sgf_parser.py index 158d6a8..bd9e26b 100644 --- a/katrain/core/sgf_parser.py +++ b/katrain/core/sgf_parser.py @@ -210,6 +210,13 @@ class SGFNode: return km + @property + def handicap(self) -> int: + try: + return int(self.root.get_property("HA", 0)) + except ValueError: + return 0 + @property def ruleset(self) -> str: """Retrieves the root's RU property, or 'japanese' if missing""" diff --git a/katrain/gui.kv b/katrain/gui.kv index 78a8697..79f9060 100644 --- a/katrain/gui.kv +++ b/katrain/gui.kv @@ -942,7 +942,6 @@ icon: 'New-Game.png' shortcut: 'Ctrl-N' on_action: root.katrain("new-game-popup") - height: root.item_height MainMenuItem: text: i18n._('menu:save') icon: 'Save-Game.png' diff --git a/katrain/gui/widgets/filebrowser.py b/katrain/gui/widgets/filebrowser.py index 9c679eb..2c491ec 100644 --- a/katrain/gui/widgets/filebrowser.py +++ b/katrain/gui/widgets/filebrowser.py @@ -207,7 +207,7 @@ Builder.load_string( id: list_view path: root.path sort_func: root.sort_func - filters: root.filters + filters: root.filters + [f.upper() for f in root.filters] filter_dirs: root.filter_dirs show_hidden: root.show_hidden multiselect: root.multiselect