1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-04-02 03:44:08 +08:00

Fix: 0 is considered as clearing input box

3cbdeb8f44
This commit is contained in:
18870
2021-11-16 12:25:55 +08:00
parent 54b11bdc94
commit 98863cfc3e

2
gui.py
View File

@@ -489,7 +489,7 @@ class AlasGUI(Frame):
config = read_file(filepath_config(config_name)) config = read_file(filepath_config(config_name))
for k, v in modified.copy().items(): for k, v in modified.copy().items():
validate = deep_get(self.ALAS_ARGS, k + '.validate') validate = deep_get(self.ALAS_ARGS, k + '.validate')
if not v: if not len(str(v)):
default = deep_get(self.ALAS_ARGS, k + '.value') default = deep_get(self.ALAS_ARGS, k + '.value')
deep_set(config, k, default) deep_set(config, k, default)
valid.append(self.path_to_idx[k]) valid.append(self.path_to_idx[k])