Skip to content
Permalink
Browse files

Fix QGIS/OTB interface for field parameters

  • Loading branch information
troopa81 authored and nyalldawson committed Jan 5, 2021
1 parent bb3e1a5 commit 52f2a4d7bc4f7f94f2cf54af03d13b6a0f191010
Showing with 4 additions and 1 deletion.
  1. +4 −1 python/plugins/processing/algs/otb/OtbAlgorithm.py
@@ -46,7 +46,8 @@
QgsProcessingParameterRasterDestination,
QgsProcessingParameterVectorDestination,
QgsProcessingParameterEnum,
QgsProcessingParameterBand)
QgsProcessingParameterBand,
QgsProcessingParameterField)

from processing.core.parameters import getParameterFromString
from processing.algs.otb.OtbChoiceWidget import OtbParameterChoice
@@ -220,6 +221,8 @@ def processAlgorithm(self, parameters, context, feedback):
value = " ".join([param.options()[i]
for i in self.parameterAsEnums(parameters, param.name(), context)
if i >= 0 and i < len(param.options())])
elif isinstance(param, QgsProcessingParameterField):
value = " ".join(self.parameterAsFields(parameters, param.name(), context))
elif isinstance(param, QgsProcessingParameterBoolean):
value = self.parameterAsBoolean(parameters, param.name(), context)
elif isinstance(param, QgsProcessingParameterCrs):

0 comments on commit 52f2a4d

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