CuraApplication: Don't parse -h or --help before last check

This commit is contained in:
Thomas Karl Pietrowski 2017-12-09 00:08:13 +01:00
parent b098b167e5
commit 1a9c152041

View file

@ -386,7 +386,7 @@ class CuraApplication(QtApplication):
def _onEngineCreated(self): def _onEngineCreated(self):
# Last check for unknown commandline arguments # Last check for unknown commandline arguments
parser = self.getCommandlineParser() parser = self.getCommandlineParser(with_help = True)
parser.parse_args() parser.parse_args()
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider()) self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
@ -630,7 +630,8 @@ class CuraApplication(QtApplication):
@classmethod @classmethod
def preStartUp(cls): def preStartUp(cls):
# Peek the arguments and look for the 'single-instance' flag. # Peek the arguments and look for the 'single-instance' flag.
parser = argparse.ArgumentParser(prog="cura") # pylint: disable=bad-whitespace parser = argparse.ArgumentParser(prog = "cura",
add_help = False) # pylint: disable=bad-whitespace
CuraApplication.addCommandLineOptions(parser) CuraApplication.addCommandLineOptions(parser)
# Important: It is important to keep this line here! # Important: It is important to keep this line here!
# In Uranium we allow to pass unknown arguments to the final executable or script. # In Uranium we allow to pass unknown arguments to the final executable or script.