Skip to content
Permalink
Browse files

ftools-fix broken random selection

  • Loading branch information
vinayan committed May 11, 2013
1 parent bbdeceb commit e2b1dbaaf0a98fa562ae482cbc39824433e59e40
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/plugins/fTools/tools/doSubsetSelect.py
@@ -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)
@@ -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()

0 comments on commit e2b1dba

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