Skip to content

Commit

Permalink
[processing] Fix grass point parameter evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 26, 2018
1 parent 22d19c9 commit 44896c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/plugins/processing/algs/grass7/Grass7Algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 44896c3

Please sign in to comment.