Skip to content

Commit db55088

Browse files
authored
Merge pull request #7265 from ablakey/fix-py-provider-index
Addressed two issues that caused createSpatialIndex() to fail.
2 parents 4059c9b + d84471b commit db55088

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/src/python/provider_python.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def fetchFeature(self, f):
9292
_f = self._source._features[list(self._source._features.keys())[self._index]]
9393
self._index += 1
9494

95-
if self._feature_id_list is not None and f.id() not in self._feature_id_list:
95+
if self._feature_id_list is not None and _f.id() not in self._feature_id_list:
9696
continue
9797

9898
if not self._filter_rect.isNull():
@@ -387,7 +387,7 @@ def supportsSubsetString(self):
387387
def createSpatialIndex(self):
388388
if self._spatialindex is None:
389389
self._spatialindex = QgsSpatialIndex()
390-
for f in self._features:
390+
for f in self._features.values():
391391
self._spatialindex.insertFeature(f)
392392
return True
393393

0 commit comments

Comments
 (0)