Skip to content

Commit

Permalink
[processing] fixed exporting multiple vector layers in SAGA and GRASS…
Browse files Browse the repository at this point in the history
… algs
  • Loading branch information
volaya committed Feb 15, 2016
1 parent 479d90a commit 961c35a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion python/plugins/processing/algs/grass/GrassAlgorithm.py
Expand Up @@ -268,7 +268,10 @@ def processAlgorithm(self, progress):
else:
self.setSessionProjectionFromLayer(layer, commands)
commands.append(self.exportRasterLayer(layer))
elif param.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
elif param.datatype in [ParameterMultipleInput.TYPE_VECTOR_ANY,
ParameterMultipleInput.TYPE_VECTOR_LINE,
ParameterMultipleInput.TYPE_VECTOR_POLYGON,
ParameterMultipleInput.TYPE_VECTOR_POINT]:
for layer in layers:
if layer in self.exportedLayers.keys():
continue
Expand Down
5 changes: 4 additions & 1 deletion python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -325,7 +325,10 @@ def processInputs(self):
else:
self.setSessionProjectionFromLayer(layer, self.commands)
self.commands.append(self.exportRasterLayer(layer))
elif param.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
elif param.datatype in [ParameterMultipleInput.TYPE_VECTOR_ANY,
ParameterMultipleInput.TYPE_VECTOR_LINE,
ParameterMultipleInput.TYPE_VECTOR_POLYGON,
ParameterMultipleInput.TYPE_VECTOR_POINT]:
for layer in layers:
if layer in self.exportedLayers.keys():
continue
Expand Down
5 changes: 4 additions & 1 deletion python/plugins/processing/algs/saga/SagaAlgorithm212.py
Expand Up @@ -162,7 +162,10 @@ def processAlgorithm(self, progress):
if exportCommand is not None:
commands.append(exportCommand)
param.value = ";".join(layers)
elif param.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
elif param.datatype in [ParameterMultipleInput.TYPE_VECTOR_ANY,
ParameterMultipleInput.TYPE_VECTOR_LINE,
ParameterMultipleInput.TYPE_VECTOR_POLYGON,
ParameterMultipleInput.TYPE_VECTOR_POINT]:
for layerfile in layers:
layer = dataobjects.getObjectFromUri(layerfile, False)
if layer:
Expand Down
5 changes: 4 additions & 1 deletion python/plugins/processing/algs/saga/SagaAlgorithm213.py
Expand Up @@ -103,7 +103,10 @@ def processAlgorithm(self, progress):
if exportCommand is not None:
commands.append(exportCommand)
param.value = ";".join(layers)
elif param.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
elif param.datatype in [ParameterMultipleInput.TYPE_VECTOR_ANY,
ParameterMultipleInput.TYPE_VECTOR_LINE,
ParameterMultipleInput.TYPE_VECTOR_POLYGON,
ParameterMultipleInput.TYPE_VECTOR_POINT]:
for layerfile in layers:
layer = dataobjects.getObjectFromUri(layerfile, False)
if layer:
Expand Down

0 comments on commit 961c35a

Please sign in to comment.