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
This commit is contained in:
cfarmer 2010-07-14 09:52:13 +00:00
parent 91c7ba5fdc
commit e2d0f00623

View File

@ -59,10 +59,10 @@ class Dialog(QDialog, Ui_Dialog):
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()
@ -75,6 +75,7 @@ class Dialog(QDialog, Ui_Dialog):
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() )