From e578014a2eb6e82f5b9db0b0bb7c805c955b6ae9 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Sat, 9 Dec 2017 11:25:01 +0100 Subject: [PATCH] Passing the already parsed args --- cura/CuraApplication.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index a5d55773d7..37e5e1f2da 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -569,8 +569,8 @@ class CuraApplication(QtApplication): self._plugins_loaded = True @classmethod - def addCommandLineOptions(self, parser): - super().addCommandLineOptions(parser) + def addCommandLineOptions(self, parser, parsed_command_line = {}): + super().addCommandLineOptions(parser, parsed_command_line = parsed_command_line) parser.add_argument("file", nargs="*", help="Files to load after starting the application.") parser.add_argument("--single-instance", action="store_true", default=False) parser.add_argument("--headless", action = "store_true", default=False) @@ -631,7 +631,7 @@ class CuraApplication(QtApplication): # Peek the arguments and look for the 'single-instance' flag. if not parser: parser = argparse.ArgumentParser(prog = "cura", add_help = False) # pylint: disable=bad-whitespace - CuraApplication.addCommandLineOptions(parser) + CuraApplication.addCommandLineOptions(parser, parsed_command_line = parsed_command_line) # Important: It is important to keep this line here! # In Uranium we allow to pass unknown arguments to the final executable or script. parsed_command_line.update(vars(parser.parse_known_args()[0]))