Skip to content

Commit

Permalink
[processing] Field calculator algorithms should not force an upper limit
Browse files Browse the repository at this point in the history
on string field lengths

Don't hold back the algorithms because of outdated format limitations!
  • Loading branch information
nyalldawson committed Feb 12, 2019
1 parent e833360 commit d614ff3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/FieldPyculator.py
Expand Up @@ -74,7 +74,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterEnum(self.FIELD_TYPE,
self.tr('Field type'), options=self.type_names))
self.addParameter(QgsProcessingParameterNumber(self.FIELD_LENGTH,
self.tr('Field length'), minValue=1, maxValue=255,
self.tr('Field length'), minValue=0,
defaultValue=10))
self.addParameter(QgsProcessingParameterNumber(self.FIELD_PRECISION,
self.tr('Field precision'), minValue=0, maxValue=15,
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/FieldsCalculator.py
Expand Up @@ -79,7 +79,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterEnum(self.FIELD_TYPE,
self.tr('Field type'), options=self.type_names))
self.addParameter(QgsProcessingParameterNumber(self.FIELD_LENGTH,
self.tr('Field length'), minValue=1, maxValue=255, defaultValue=10))
self.tr('Field length'), minValue=0, defaultValue=10))
self.addParameter(QgsProcessingParameterNumber(self.FIELD_PRECISION,
self.tr('Field precision'), minValue=0, maxValue=15, defaultValue=3))
self.addParameter(QgsProcessingParameterBoolean(self.NEW_FIELD,
Expand Down

0 comments on commit d614ff3

Please sign in to comment.