From ebaa45a7ecb1a39bbc3eb8549210208b47efd8af Mon Sep 17 00:00:00 2001 From: Stephen Tomkinson Date: Thu, 6 Aug 2020 17:54:29 +0100 Subject: [PATCH] Copy widgets and their configuration from parent parsers. Resolves #608 --- gooey/python_bindings/gooey_parser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gooey/python_bindings/gooey_parser.py b/gooey/python_bindings/gooey_parser.py index e431a2e..bb26da9 100644 --- a/gooey/python_bindings/gooey_parser.py +++ b/gooey/python_bindings/gooey_parser.py @@ -68,6 +68,11 @@ class GooeyParser(object): self.__dict__['parser'] = ArgumentParser(**kwargs) self.widgets = {} self.options = {} + if 'parents' in kwargs: + for parent in kwargs['parents']: + if isinstance(parent, self.__class__): + self.widgets.update(parent.widgets) + self.options.update(parent.options) @property def _mutually_exclusive_groups(self):