mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:39:02 +08:00
CuraApplication: Don't parse -h or --help before last check
This commit is contained in:
parent
b098b167e5
commit
1a9c152041
@ -386,7 +386,7 @@ class CuraApplication(QtApplication):
|
||||
|
||||
def _onEngineCreated(self):
|
||||
# Last check for unknown commandline arguments
|
||||
parser = self.getCommandlineParser()
|
||||
parser = self.getCommandlineParser(with_help = True)
|
||||
parser.parse_args()
|
||||
|
||||
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
|
||||
@ -630,7 +630,8 @@ class CuraApplication(QtApplication):
|
||||
@classmethod
|
||||
def preStartUp(cls):
|
||||
# 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)
|
||||
# Important: It is important to keep this line here!
|
||||
# In Uranium we allow to pass unknown arguments to the final executable or script.
|
||||
|
Loading…
x
Reference in New Issue
Block a user