Skip to content
Permalink
Browse files
[processing] Add [not set] option for field combos when parent layer …
…changes (fix #10728), also fix some strings displaying with extra spaces
  • Loading branch information
nyalldawson committed Jun 26, 2014
1 parent 4d6cfd9 commit 0a7e69c6a0584a27e7560a1a5ec5e53fbd03b834
@@ -56,8 +56,8 @@ def defineCharacteristics(self):
self.addParameter(ParameterCrs(self.DEST_SRS,
'Destination SRS (EPSG Code)', 'EPSG:4326'))
self.addParameter(ParameterNumber(self.TR,
'Output file resolution in target georeferenced units \
(leave 0 for no change)', 0.0, None, 0.0))
'Output file resolution in target georeferenced units (leave 0 for no change)',
0.0, None, 0.0))
self.addParameter(ParameterSelection(self.METHOD, 'Resampling method',
self.METHOD_OPTIONS))
self.addParameter(ParameterString(self.EXTRA,
@@ -53,8 +53,8 @@ def defineCharacteristics(self):
self.addParameter(ParameterVector(ConvexHull.INPUT, 'Input layer',
[ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterTableField(ConvexHull.FIELD,
'Field (optional, only used if creating convex \
hulls by classes)', ConvexHull.INPUT, optional=True))
'Field (optional, only used if creating convex hulls by classes)',
ConvexHull.INPUT, optional=True))
self.addParameter(ParameterSelection(ConvexHull.METHOD, 'Method',
ConvexHull.METHODS))
self.addOutput(OutputVector(ConvexHull.OUTPUT, 'Convex hull'))
@@ -327,6 +327,8 @@ def updateDependentFields(self):
for child in children:
widget = self.valueItems[child]
widget.clear()
if self.alg.getParameterFromName(child).optional:
widget.addItem("[not set]")
widget.addItems(self.getFields(layer,
self.alg.getParameterFromName(child).datatype))

0 comments on commit 0a7e69c

Please sign in to comment.