Skip to content
Permalink
Browse files

fixed MMQGIS Extract by attributes

  • Loading branch information
giohappy authored and volaya committed Nov 6, 2013
1 parent c4e39ab commit 021c7e60777339d656f22c984b9d7af2f6382636
Showing with 4 additions and 3 deletions.
  1. +4 −3 python/plugins/processing/algs/mmqgisx/MMQGISXAlgorithms.py
@@ -1136,7 +1136,8 @@ def processAlgorithm(self, progress):

filename = self.getParameterValue(self.LAYERNAME)
layer = dataobjects.getObjectFromUri(filename)

provider = layer.dataProvider()
fields = provider.fields()
attribute = self.getParameterValue(self.ATTRIBUTE)
comparison = self.comparisons[self.getParameterValue(self.COMPARISON)]
comparisonvalue = self.getParameterValue(self.COMPARISONVALUE)
@@ -1146,8 +1147,8 @@ def processAlgorithm(self, progress):
features = vector.features(layer)
featureCount = len(features)
output = self.getOutputFromName(self.OUTPUT)
writer = output.getVectorWriter(layer.fields(),
layer.geometryType(), layer.crs())
writer = output.getVectorWriter(fields,
provider.geometryType(), layer.crs())
for (i, feat) in enumerate(features):
if feat.id() in selected:
writer.addFeature(feat)

0 comments on commit 021c7e6

Please sign in to comment.
You can’t perform that action at this time.