fix #292
This commit is contained in:
1 parent
013cbff40f
commit
c5570ad56d
6 files changed
+11
-5
No files matched your search
+1
-1
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"""
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user