Skip to content

Commit

Permalink
ftools-fix broken random selection
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayan committed May 11, 2013
1 parent bbdeceb commit e2b1dba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/plugins/fTools/tools/doSubsetSelect.py
Expand Up @@ -81,8 +81,9 @@ def accept(self):

def compute(self, inVect, inField, value, perc, progressBar):
mlayer = ftools_utils.getMapLayerByName(inVect)
mlayer.removeSelection(True)
mlayer.removeSelection()
vlayer = ftools_utils.getVectorLayerByName(inVect)
vprovider = vlayer.dataProvider()
index = vprovider.fieldNameIndex(inField)
#unique = []
#vprovider.uniqueValues(index, unique)
Expand All @@ -93,7 +94,7 @@ def compute(self, inVect, inField, value, perc, progressBar):
nElement = 0
self.progressBar.setValue(0)
self.progressBar.setRange(0, nFeat)
fit = vprovider.getFeatures()
fit = vprovider.getFeatures()
if not len(unique) == mlayer.featureCount():
for i in unique:
fit.rewind()
Expand Down

0 comments on commit e2b1dba

Please sign in to comment.