Skip to content
Permalink
Browse files

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

…ands

(cherry-picked from 113e163)
  • Loading branch information
nyalldawson committed Aug 9, 2018
1 parent 0132323 commit ec96588313a1988685924e8a8201940a29744b98
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 ec96588

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