Skip to content

Commit 44896c3

Browse files
committedFeb 26, 2018
[processing] Fix grass point parameter evaluation
1 parent 22d19c9 commit 44896c3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎python/plugins/processing/algs/grass7/Grass7Algorithm.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,13 @@ def processCommand(self, parameters, context, delOutputs=False):
561561
value = '"{}"'.format(
562562
self.parameterAsString(parameters, paramName, context)
563563
)
564-
# For numbers and points, we translate as a string
564+
elif isinstance(param, QgsProcessingParameterPoint):
565+
if self.parameterAsString(parameters, paramName, context):
566+
# parameter specified, evaluate as point
567+
# TODO - handle CRS transform
568+
point = self.parameterAsPoint(parameters, paramName, context)
569+
value = '{},{}'.format(point.x(), point.y())
570+
# For numbers, we translate as a string
565571
elif isinstance(param, (QgsProcessingParameterNumber,
566572
QgsProcessingParameterPoint)):
567573
value = self.parameterAsString(parameters, paramName, context)

0 commit comments

Comments
 (0)
Please sign in to comment.