Skip to content
Permalink
Browse files
[processing] fix rasters handling in checkParameterValues()
  • Loading branch information
alexbruy committed Nov 9, 2017
1 parent b421479 commit 3822efa7a566166c8def314cb7b95f14ff1ffbe3
Showing 1 changed file with 4 additions and 5 deletions.
@@ -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.