Skip to content
Permalink
Browse files
Fix #8864 (Random selection with subsampling broken)
  • Loading branch information
wonder-sk committed Feb 7, 2014
1 parent a9be559 commit 408e2b7a121e241ef859a95929245f13505d7442
@@ -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()
@@ -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()

0 comments on commit 408e2b7

Please sign in to comment.