Skip to content

Commit

Permalink
[processing] fix Select by Attribute algorithm (fix #12289)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed May 20, 2015
1 parent 8cc6c32 commit 9b41e7b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/plugins/processing/algs/qgis/SelectByAttribute.py
Expand Up @@ -66,10 +66,11 @@ def defineCharacteristics(self):
self.tr('Operator'), self.OPERATORS))
self.addParameter(ParameterString(self.VALUE, self.tr('Value')))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output'), True))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
fileName = self.getParameterValue(self.INPUT)
layer = dataobjects.getObjectFromUri(fileName)
fieldName = self.getParameterValue(self.FIELD)
operator = self.OPERATORS[self.getParameterValue(self.OPERATOR)]
value = self.getParameterValue(self.VALUE)
Expand Down Expand Up @@ -119,4 +120,4 @@ def processAlgorithm(self, progress):
progress.setPercentage(int(count * total))

layer.setSelectedFeatures(selected)
self.setOutputValue(self.OUTPUT, self.getParameterValue(self.INPUT))
self.setOutputValue(self.OUTPUT, fileName)

0 comments on commit 9b41e7b

Please sign in to comment.