Skip to content

Commit

Permalink
Fix #8864 (Random selection with subsampling broken)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Feb 7, 2014
1 parent a9be559 commit 408e2b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions python/plugins/fTools/tools/doSubsetSelect.py
Expand Up @@ -92,10 +92,9 @@ def compute(self, inVect, inField, value, perc, progressBar):
nElement = 0
self.progressBar.setValue(0)
self.progressBar.setRange(0, nFeat)
fit = vprovider.getFeatures()
if not len(unique) == mlayer.featureCount():
for i in unique:
fit.rewind()
fit = vprovider.getFeatures()
FIDs= []
while fit.nextFeature(inFeat):
atMap = inFeat.attributes()
Expand Down
Expand Up @@ -99,10 +99,9 @@ def processAlgorithm(self, progress):
current = 0
total = 100.0 / float(featureCount * len(unique))

features = vector.features(layer)

if not len(unique) == featureCount:
for i in unique:
features = vector.features(layer)
FIDs = []
for inFeat in features:
attrs = inFeat.attributes()
Expand Down

0 comments on commit 408e2b7

Please sign in to comment.