Skip to content

Commit

Permalink
Fix otbalgorithm when several band are selected
Browse files Browse the repository at this point in the history
(cherry picked from commit 454c4f6)
  • Loading branch information
troopa81 authored and nyalldawson committed Jan 15, 2021
1 parent f36c945 commit e50ac51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/plugins/processing/algs/otb/OtbAlgorithm.py
Expand Up @@ -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()])
Expand Down

0 comments on commit e50ac51

Please sign in to comment.