Skip to content
Permalink
Browse files

Fix otbalgorithm when several band are selected

  • Loading branch information
troopa81 authored and nyalldawson committed Jan 5, 2021
1 parent 52f2a4d commit 454c4f6ebabbe0eed8dd4ed5d904dab59375c63e
Showing with 2 additions and 1 deletion.
  1. +2 −1 python/plugins/processing/algs/otb/OtbAlgorithm.py
@@ -252,7 +252,8 @@ def processAlgorithm(self, parameters, context, feedback):
elif isinstance(param, QgsProcessingParameterString):
value = '"{}"'.format(self.parameterAsString(parameters, param.name(), context))
elif isinstance(param, QgsProcessingParameterBand):
value = '"Channel{}"'.format(self.parameterAsInt(parameters, param.name(), context))
value = ' '.join(['"Channel{}"'.format(index) for index in
self.parameterAsInts(parameters, param.name(), context)])
else:
# Use whatever is given
value = '"{}"'.format(parameters[param.name()])

0 comments on commit 454c4f6

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