Skip to content
Permalink
Browse files

[processing] fix rasters handling in checkParameterValues()

  • Loading branch information
alexbruy committed Sep 5, 2017
1 parent b421479 commit 3822efa7a566166c8def314cb7b95f14ff1ffbe3
Showing with 4 additions and 5 deletions.
  1. +4 −5 python/plugins/processing/algs/saga/SagaAlgorithm.py
@@ -374,15 +374,14 @@ def checkParameterValues(self, parameters, context):
"""
extent = None
for param in self.parameterDefinitions():
files = []
layers = []
if isinstance(param, QgsProcessingParameterRasterLayer):
files = [parameters[param.name()]]
layers.append(parameters[param.name()])
elif (isinstance(param, QgsProcessingParameterMultipleLayers) and
param.datatype == QgsProcessing.TypeRaster):
if parameters[param.name()] is not None:
files = parameters[param.name()]
for f in files:
layer = QgsProcessingUtils.mapLayerFromString(f, context)
layers.append(parameters[param.name()])
for layer in layers:
if layer is None:
continue
if layer.bandCount() > 1:

0 comments on commit 3822efa

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