Skip to content
Permalink
Browse files
Rename parameter for consistency with other algs
  • Loading branch information
nyalldawson committed Aug 30, 2017
1 parent 43e4ed0 commit 8dde180
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
@@ -49,7 +49,7 @@

class ExtentFromLayer(QgisAlgorithm):

INPUT_LAYER = 'INPUT_LAYER'
INPUT = 'INPUT'
BY_FEATURE = 'BY_FEATURE'

OUTPUT = 'OUTPUT'
@@ -67,7 +67,7 @@ def __init__(self):
super().__init__()

def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterFeatureSource(self.INPUT_LAYER, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterFeatureSource(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBoolean(self.BY_FEATURE,
self.tr('Calculate extent for each feature separately'), False))

@@ -80,7 +80,7 @@ def displayName(self):
return self.tr('Polygon from vector extent')

def processAlgorithm(self, parameters, context, feedback):
source = self.parameterAsSource(parameters, self.INPUT_LAYER, context)
source = self.parameterAsSource(parameters, self.INPUT, context)
byFeature = self.parameterAsBool(parameters, self.BY_FEATURE, context)

fields = QgsFields()
@@ -2845,7 +2845,7 @@ tests:
name: Standard polygon from layer extent
params:
BY_FEATURE: false
INPUT_LAYER:
INPUT:
name: polys.gml
type: vector
results:

0 comments on commit 8dde180

Please sign in to comment.