Skip to content

Commit

Permalink
Fix some numeric parameters which should be doubles
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 9, 2018
1 parent a934060 commit f6d5616
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/ExtendLines.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def __init__(self):

def initParameters(self, config=None):
self.addParameter(QgsProcessingParameterNumber(self.START_DISTANCE,
self.tr('Start distance'), defaultValue=0.0))
self.tr('Start distance'), type=QgsProcessingParameterNumber.Double, defaultValue=0.0))
self.addParameter(QgsProcessingParameterNumber(self.END_DISTANCE,
self.tr('End distance'), defaultValue=0.0))
self.tr('End distance'), type=QgsProcessingParameterNumber.Double, defaultValue=0.0))

def name(self):
return 'extendlines'
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/HypsometricCurves.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterFeatureSource(self.BOUNDARY_LAYER,
self.tr('Boundary layer'), [QgsProcessing.TypeVectorPolygon]))
self.addParameter(QgsProcessingParameterNumber(self.STEP,
self.tr('Step'), minValue=0.0, maxValue=999999999.999999, defaultValue=100.0))
self.tr('Step'), type=QgsProcessingParameterNumber.Double, minValue=0.0, maxValue=999999999.999999, defaultValue=100.0))
self.addParameter(QgsProcessingParameterBoolean(self.USE_PERCENTAGE,
self.tr('Use % of area instead of absolute value'), defaultValue=False))

Expand Down
6 changes: 3 additions & 3 deletions python/plugins/processing/algs/qgis/PointsAlongGeometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterFeatureSource(self.INPUT,
self.tr('Input layer'), [QgsProcessing.TypeVectorPolygon, QgsProcessing.TypeVectorLine]))
self.addParameter(QgsProcessingParameterNumber(self.DISTANCE,
self.tr('Distance'), minValue=0.0, defaultValue=1.0))
self.tr('Distance'), type=QgsProcessingParameterNumber.Double, minValue=0.0, defaultValue=1.0))
self.addParameter(QgsProcessingParameterNumber(self.START_OFFSET,
self.tr('Start offset'), minValue=0.0, defaultValue=0.0))
self.tr('Start offset'), type=QgsProcessingParameterNumber.Double, minValue=0.0, defaultValue=0.0))
self.addParameter(QgsProcessingParameterNumber(self.END_OFFSET,
self.tr('End offset'), minValue=0.0, defaultValue=0.0))
self.tr('End offset'), type=QgsProcessingParameterNumber.Double, minValue=0.0, defaultValue=0.0))

self.addParameter(QgsProcessingParameterFeatureSink(self.OUTPUT, self.tr('Points'), QgsProcessing.TypeVectorPoint))

Expand Down

0 comments on commit f6d5616

Please sign in to comment.