Skip to content
Permalink
Browse files
[BUGFIX][Processing] Vector tools -- add next methods for features it…
…erator
  • Loading branch information
rldhont committed Mar 15, 2017
1 parent e4df60b commit a7f92bd89d459090d208b8d5b5074ea27c8f625d
Showing with 8 additions and 0 deletions.
  1. +8 −0 python/plugins/processing/tools/vector.py
@@ -113,12 +113,20 @@ def __init__(self, layer, request):
def __iter__(self):
return self.iter

def __next__(self):
'''Iterator next method in python 3'''
return next(self.iter)

def __len__(self):
if self.selection:
return int(self.layer.selectedFeatureCount())
else:
return int(self.layer.featureCount())

def next(self):
'''Iterator next method in python 2'''
return self.__next__()

return Features(layer, request)


0 comments on commit a7f92bd

Please sign in to comment.