Skip to content
Snippets Groups Projects
Commit 4e6560d8 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

fsleyes_parseargs.generateSceneArgs allows arguments to be excluded -

used by CanvasPanel genCommandLineArgs action to prevent performance
setting from being output.
parent 11681beb
No related branches found
No related tags found
No related merge requests found
......@@ -880,11 +880,14 @@ def applySceneArgs(args, overlayList, displayCtx, sceneOpts):
_applyArgs(args, sceneOpts)
def generateSceneArgs(overlayList, displayCtx, sceneOpts):
def generateSceneArgs(overlayList, displayCtx, sceneOpts, exclude=None):
"""Generates command line arguments which describe the current state of
the provided ``displayCtx`` and ``sceneOpts`` instances.
"""
if exclude is None:
exclude = []
args = []
args += ['--{}'.format(ARGUMENTS['Main.scene'][1])]
......@@ -903,6 +906,8 @@ def generateSceneArgs(overlayList, displayCtx, sceneOpts):
args += ['{}'.format(displayCtx.selectedOverlay)]
props = OPTIONS.get(sceneOpts, allhits=True)
props = [p for p in props if p not in exclude]
args += _generateArgs(sceneOpts, concat(props))
return args
......
......@@ -316,7 +316,10 @@ def _genCommandLineArgs(overlayList, displayCtx, canvas):
# Add scene options
sceneOpts = canvas.getSceneOptions()
argv += fsleyes_parseargs.generateSceneArgs(
overlayList, displayCtx, sceneOpts)
overlayList,
displayCtx,
sceneOpts,
exclude=['performance'])
# Add ortho specific options, if it's
# an orthopanel we're dealing with
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment