mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[BUGFIX][Processing] Vector tools -- add next methods for features iterator
This commit is contained in:
parent
f18b8980ae
commit
eb2231925f
@ -130,6 +130,10 @@ def features(layer, request=QgsFeatureRequest()):
|
||||
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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user