Skip to content
Permalink
Browse files

[processing] fix integer numbers handling

  • Loading branch information
alexbruy committed Sep 5, 2017
1 parent 2b218cc commit 1b6b6cdb453269c76b8920624b75585c0d8083f4
Showing with 4 additions and 1 deletion.
  1. +4 −1 python/plugins/processing/algs/saga/SagaAlgorithm.py
@@ -258,7 +258,10 @@ def processAlgorithm(self, parameters, context, feedback):
for i in range(4):
command += ' -{} {}'.format(self.extentParamNames[i], float(values[i]) + offset[i])
elif isinstance(param, QgsProcessingParameterNumber):
command += ' -{} {}'.format(param.name(), self.parameterAsDouble(parameters, param.name(), context))
if param.dataType() == QgsProcessingParameterNumber.Integer:
command += ' -{} {}'.format(param.name(), self.parameterAsInt(parameters, param.name(), context))
else:
command += ' -{} {}'.format(param.name(), self.parameterAsDouble(parameters, param.name(), context))
elif isinstance(param, QgsProcessingParameterEnum):
command += ' -{} {}'.format(param.name(), self.parameterAsEnum(parameters, param.name(), context))
elif isinstance(param, (QgsProcessingParameterString, QgsProcessingParameterFile)):

0 comments on commit 1b6b6cd

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