diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ui_loadsave.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/ui_loadsave.py b/modules/ui_loadsave.py index 728fec9e..0052a5cc 100644 --- a/modules/ui_loadsave.py +++ b/modules/ui_loadsave.py @@ -55,7 +55,7 @@ class UiLoadsave: if field == 'value' and key not in self.component_mapping:
self.component_mapping[key] = x
- if type(x) in [gr.Slider, gr.Radio, gr.Checkbox, gr.Textbox, gr.Number, gr.Dropdown, ToolButton] and x.visible:
+ if type(x) in [gr.Slider, gr.Radio, gr.Checkbox, gr.Textbox, gr.Number, gr.Dropdown, ToolButton, gr.Button] and x.visible:
apply_field(x, 'visible')
if type(x) == gr.Slider:
@@ -109,6 +109,8 @@ class UiLoadsave: self.add_block(c, path)
elif x.label is not None:
self.add_component(f"{path}/{x.label}", x)
+ elif isinstance(x, gr.Button) and x.value is not None:
+ self.add_component(f"{path}/{x.value}", x)
def read_from_file(self):
with open(self.filename, "r", encoding="utf8") as file:
|