Skip to content

Commit

Permalink
Select by location now works on full layer extent. Fixes #2210.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13915 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer committed Jul 14, 2010
1 parent 91c7ba5 commit e2d0f00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/plugins/fTools/tools/doSelectByLocation.py
Expand Up @@ -59,10 +59,10 @@ def compute(self, inPoly, inPts, modify):
selectLayer = ftools_utils.getVectorLayerByName(inPts)
inputProvider = inputLayer.dataProvider()
allAttrs = inputProvider.attributeIndexes()
inputProvider.select(allAttrs)
inputProvider.select(allAttrs, QgsRectangle())
selectProvider = selectLayer.dataProvider()
allAttrs = selectProvider.attributeIndexes()
selectProvider.select(allAttrs)
selectProvider.select(allAttrs, QgsRectangle())
feat = QgsFeature()
infeat = QgsFeature()
geom = QgsGeometry()
Expand All @@ -75,6 +75,7 @@ def compute(self, inPoly, inPts, modify):
while selectProvider.nextFeature(feat):
geom = QgsGeometry(feat.geometry())
intersects = index.intersects(geom.boundingBox())
print len(intersects)
for id in intersects:
inputProvider.featureAtId(int(id), infeat, True)
tmpGeom = QgsGeometry( infeat.geometry() )
Expand Down

0 comments on commit e2d0f00

Please sign in to comment.