Skip to content

Commit e2d0f00

Browse files
author
cfarmer
committed
Select by location now works on full layer extent. Fixes #2210.
git-svn-id: http://svn.osgeo.org/qgis/trunk@13915 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 91c7ba5 commit e2d0f00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/plugins/fTools/tools/doSelectByLocation.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ def compute(self, inPoly, inPts, modify):
5959
selectLayer = ftools_utils.getVectorLayerByName(inPts)
6060
inputProvider = inputLayer.dataProvider()
6161
allAttrs = inputProvider.attributeIndexes()
62-
inputProvider.select(allAttrs)
62+
inputProvider.select(allAttrs, QgsRectangle())
6363
selectProvider = selectLayer.dataProvider()
6464
allAttrs = selectProvider.attributeIndexes()
65-
selectProvider.select(allAttrs)
65+
selectProvider.select(allAttrs, QgsRectangle())
6666
feat = QgsFeature()
6767
infeat = QgsFeature()
6868
geom = QgsGeometry()
@@ -75,6 +75,7 @@ def compute(self, inPoly, inPts, modify):
7575
while selectProvider.nextFeature(feat):
7676
geom = QgsGeometry(feat.geometry())
7777
intersects = index.intersects(geom.boundingBox())
78+
print len(intersects)
7879
for id in intersects:
7980
inputProvider.featureAtId(int(id), infeat, True)
8081
tmpGeom = QgsGeometry( infeat.geometry() )

0 commit comments

Comments
 (0)