From 317d00b2a6f81eb58e33487abf05a8b84ef01dd0 Mon Sep 17 00:00:00 2001 From: AnyISalIn Date: Fri, 1 Sep 2023 21:45:11 +0800 Subject: fix: update shared.opts.data when add_option Signed-off-by: AnyISalIn --- modules/options.py | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/options.py') diff --git a/modules/options.py b/modules/options.py index 758b1ce5..e75916d2 100644 --- a/modules/options.py +++ b/modules/options.py @@ -210,6 +210,7 @@ class Options: def add_option(self, key, info): self.data_labels[key] = info + self.data[key] = info.default def reorder(self): """reorder settings so that all items related to section always go together""" -- cgit v1.2.1 From 93015964c7c920fbb834bf99977ab8e16296efac Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Tue, 12 Sep 2023 22:43:35 +0900 Subject: fix add_option overriding config with default --- modules/options.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/options.py') diff --git a/modules/options.py b/modules/options.py index e75916d2..ab40aff7 100644 --- a/modules/options.py +++ b/modules/options.py @@ -210,7 +210,8 @@ class Options: def add_option(self, key, info): self.data_labels[key] = info - self.data[key] = info.default + if key not in self.data: + self.data[key] = info.default def reorder(self): """reorder settings so that all items related to section always go together""" -- cgit v1.2.1