Skip to content

Commit 541f920

Browse files
committed
Update python_easy_chess_gui.py
* When editing engine option value, engine json file should show correct type of value, if it is integer, json file should not enclose value with double quotes making it a string.
1 parent c2c48f4 commit 541f920

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python_easy_chess_gui.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262

6363
APP_NAME = 'Python Easy Chess GUI'
64-
APP_VERSION = 'v1.10'
64+
APP_VERSION = 'v1.11'
6565
BOX_TITLE = '{} {}'.format(APP_NAME, APP_VERSION)
6666

6767

@@ -1024,13 +1024,15 @@ def update_engine_to_config_file(self, eng_path_file, new_name, old_name, user_o
10241024
for d in v:
10251025
# d = {'name': 'Ponder', 'default': False,
10261026
# 'value': False, 'type': 'check'}
1027-
1027+
1028+
default_type = type(d['default'])
10281029
opt_name = d['name']
10291030
opt_value = d['value']
10301031
for u in user_opt:
10311032
# u = {'name': 'CDrill 1400'}
10321033
for k1, v1 in u.items():
10331034
if k1 == opt_name:
1035+
v1 = int(v1) if default_type == int else v1
10341036
if v1 != opt_value:
10351037
d['value'] = v1
10361038
break

0 commit comments

Comments
 (0)