Skip to content
Permalink
Browse files

Merge pull request #7265 from ablakey/fix-py-provider-index

Addressed two issues that caused createSpatialIndex() to fail.
  • Loading branch information
elpaso committed Jun 19, 2018
2 parents 4059c9b + d84471b commit db55088f1d236e2849657bbe26250c9a837e5610
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/src/python/provider_python.py
@@ -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():
@@ -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

0 comments on commit db55088

Please sign in to comment.
You can’t perform that action at this time.