Skip to content
Permalink
Browse files

[processing] fix Select by Attribute algorithm (fix #12289)

  • Loading branch information
alexbruy committed May 20, 2015
1 parent 8cc6c32 commit 9b41e7bb9ac7546ddad9a705530f2639b8b24650
Showing with 4 additions and 3 deletions.
  1. +4 −3 python/plugins/processing/algs/qgis/SelectByAttribute.py
@@ -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)
@@ -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.
You can’t perform that action at this time.