Skip to content

Commit

Permalink
Merge pull request #7265 from ablakey/fix-py-provider-index
Browse files Browse the repository at this point in the history
Addressed two issues that caused createSpatialIndex() to fail.
  • Loading branch information
elpaso committed Jun 19, 2018
2 parents 4059c9b + d84471b commit db55088
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/provider_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def fetchFeature(self, f):
_f = self._source._features[list(self._source._features.keys())[self._index]]
self._index += 1

if self._feature_id_list is not None and f.id() not in self._feature_id_list:
if self._feature_id_list is not None and _f.id() not in self._feature_id_list:
continue

if not self._filter_rect.isNull():
Expand Down Expand Up @@ -387,7 +387,7 @@ def supportsSubsetString(self):
def createSpatialIndex(self):
if self._spatialindex is None:
self._spatialindex = QgsSpatialIndex()
for f in self._features:
for f in self._features.values():
self._spatialindex.insertFeature(f)
return True

Expand Down

0 comments on commit db55088

Please sign in to comment.