Skip to content
Permalink
Browse files

[processing][grass] Fix skipped outputs are still added in grass comm…

…ands
  • Loading branch information
nyalldawson committed Aug 9, 2018
1 parent 526e590 commit 113e16351d7a254876d2b2d428a6d7652d593d9c
Showing with 10 additions and 9 deletions.
  1. +10 −9 python/plugins/processing/algs/grass7/Grass7Algorithm.py
@@ -633,15 +633,16 @@ def processCommand(self, parameters, context, feedback, delOutputs=False):
uniqueBasename = outName + self.uniqueSuffix
command += ' {}={}'.format(outName, uniqueBasename)
else:
# We add an output name to make sure it is unique if the session
# uses this algorithm several times.
#value = self.parameterAsOutputLayer(parameters, outName, context)
uniqueOutputName = outName + self.uniqueSuffix
command += ' {}={}'.format(outName, uniqueOutputName)

# Add output file to exported layers, to indicate that
# they are present in GRASS
self.exportedLayers[outName] = uniqueOutputName
if outName in parameters and parameters[outName] is not None:
# We add an output name to make sure it is unique if the session
# uses this algorithm several times.
#value = self.parameterAsOutputLayer(parameters, outName, context)
uniqueOutputName = outName + self.uniqueSuffix
command += ' {}={}'.format(outName, uniqueOutputName)

# Add output file to exported layers, to indicate that
# they are present in GRASS
self.exportedLayers[outName] = uniqueOutputName

command += ' --overwrite'
self.commands.append(command)

0 comments on commit 113e163

Please sign in to comment.
You can’t perform that action at this time.