Opt: Display default value immediately after delete setting

This commit is contained in:
18870 2022-08-12 23:23:41 +08:00
parent db78b46a75
commit 28f1411933

View File

@ -409,9 +409,11 @@ class AlasGUI(Frame):
validate = deep_get(self.ALAS_ARGS, k + ".validate")
if not len(str(v)):
default = deep_get(self.ALAS_ARGS, k + ".value")
modified[k] = default
deep_set(config, k, default)
valid.append(k)
modified[k] = default
pin["_".join(k.split("."))] = default
elif not validate or re_fullmatch(validate, v):
deep_set(config, k, v)
valid.append(k)