Skip to content

Commit 961c35a

Browse files
committed
[processing] fixed exporting multiple vector layers in SAGA and GRASS algs
1 parent 479d90a commit 961c35a

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

python/plugins/processing/algs/grass/GrassAlgorithm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,10 @@ def processAlgorithm(self, progress):
268268
else:
269269
self.setSessionProjectionFromLayer(layer, commands)
270270
commands.append(self.exportRasterLayer(layer))
271-
elif param.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
271+
elif param.datatype in [ParameterMultipleInput.TYPE_VECTOR_ANY,
272+
ParameterMultipleInput.TYPE_VECTOR_LINE,
273+
ParameterMultipleInput.TYPE_VECTOR_POLYGON,
274+
ParameterMultipleInput.TYPE_VECTOR_POINT]:
272275
for layer in layers:
273276
if layer in self.exportedLayers.keys():
274277
continue

python/plugins/processing/algs/grass7/Grass7Algorithm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,10 @@ def processInputs(self):
325325
else:
326326
self.setSessionProjectionFromLayer(layer, self.commands)
327327
self.commands.append(self.exportRasterLayer(layer))
328-
elif param.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
328+
elif param.datatype in [ParameterMultipleInput.TYPE_VECTOR_ANY,
329+
ParameterMultipleInput.TYPE_VECTOR_LINE,
330+
ParameterMultipleInput.TYPE_VECTOR_POLYGON,
331+
ParameterMultipleInput.TYPE_VECTOR_POINT]:
329332
for layer in layers:
330333
if layer in self.exportedLayers.keys():
331334
continue

python/plugins/processing/algs/saga/SagaAlgorithm212.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ def processAlgorithm(self, progress):
162162
if exportCommand is not None:
163163
commands.append(exportCommand)
164164
param.value = ";".join(layers)
165-
elif param.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
165+
elif param.datatype in [ParameterMultipleInput.TYPE_VECTOR_ANY,
166+
ParameterMultipleInput.TYPE_VECTOR_LINE,
167+
ParameterMultipleInput.TYPE_VECTOR_POLYGON,
168+
ParameterMultipleInput.TYPE_VECTOR_POINT]:
166169
for layerfile in layers:
167170
layer = dataobjects.getObjectFromUri(layerfile, False)
168171
if layer:

python/plugins/processing/algs/saga/SagaAlgorithm213.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ def processAlgorithm(self, progress):
103103
if exportCommand is not None:
104104
commands.append(exportCommand)
105105
param.value = ";".join(layers)
106-
elif param.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
106+
elif param.datatype in [ParameterMultipleInput.TYPE_VECTOR_ANY,
107+
ParameterMultipleInput.TYPE_VECTOR_LINE,
108+
ParameterMultipleInput.TYPE_VECTOR_POLYGON,
109+
ParameterMultipleInput.TYPE_VECTOR_POINT]:
107110
for layerfile in layers:
108111
layer = dataobjects.getObjectFromUri(layerfile, False)
109112
if layer:

0 commit comments

Comments
 (0)