From 44896c36366414ec776f18baeda8ea51e182e3e3 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 26 Feb 2018 15:10:24 +1000 Subject: [PATCH] [processing] Fix grass point parameter evaluation --- python/plugins/processing/algs/grass7/Grass7Algorithm.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/plugins/processing/algs/grass7/Grass7Algorithm.py b/python/plugins/processing/algs/grass7/Grass7Algorithm.py index 991d90417fac..29722f797edd 100644 --- a/python/plugins/processing/algs/grass7/Grass7Algorithm.py +++ b/python/plugins/processing/algs/grass7/Grass7Algorithm.py @@ -561,7 +561,13 @@ def processCommand(self, parameters, context, delOutputs=False): value = '"{}"'.format( self.parameterAsString(parameters, paramName, context) ) - # For numbers and points, we translate as a string + elif isinstance(param, QgsProcessingParameterPoint): + if self.parameterAsString(parameters, paramName, context): + # parameter specified, evaluate as point + # TODO - handle CRS transform + point = self.parameterAsPoint(parameters, paramName, context) + value = '{},{}'.format(point.x(), point.y()) + # For numbers, we translate as a string elif isinstance(param, (QgsProcessingParameterNumber, QgsProcessingParameterPoint)): value = self.parameterAsString(parameters, paramName, context)