[Qgis-developer] QGIS python vector layer select behaviour
Tim Sutton
lists at linfiniti.com
Mon Sep 10 15:01:49 PDT 2012
Hi All
If I take this simple little script and run it in the QGIS python
console after loading e.g. the tests/testdata/points.shp, nothing gets
selected:
from qgis.utils import iface
l = iface.activeLayer()
r = iface.mapCanvas().extent()
m = l.dataProvider().attributeIndexes()
l.select(m, r, True, True)
However this one works fine:
from qgis.utils import iface
l = iface.activeLayer()
r = iface.mapCanvas().extent()
l.select(r, True)
Does anyone know why the first does not work?
Thanks
--
Tim Sutton - QGIS Project Steering Committee Member (Release Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.
Visit http://linfiniti.com to find out about:
* QGIS programming and support services
* Mapserver and PostGIS based hosting plans
* FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================
More information about the Qgis-developer
mailing list