Skip to content

Commit

Permalink
[processing][grass] Fix skipped outputs are still added in grass comm…
Browse files Browse the repository at this point in the history
…ands
  • Loading branch information
nyalldawson committed Aug 9, 2018
1 parent 526e590 commit 113e163
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -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)
Expand Down

0 comments on commit 113e163

Please sign in to comment.