[Qgis-developer] Annoying bug found in QGIS 1.7 (not present in 1.6)

luca_manganelli at comune.trento.it luca_manganelli at comune.trento.it
Wed Jun 15 08:18:15 EDT 2011


Hi,

I wrote a PYTHON plugin that does a simple feature select on a
QgsVectorLayer:

  pnt = <coordinates of mouse click on map >
  myLayer= <QgsVectorLayer Object>
  tolerance = 1
  rectangle = QgsRectangle()
  rectangle.setXMinimum (pnt.x() - tolerance)
  rectangle.setXMaximum (pnt.x() + tolerance)
  rectangle.setYMinimum (pnt.y() - tolerance)
  rectangle.setYMaximum (pnt.y() + tolerance)
  myLayer.select(rectangle , True)

in QGIS 1.6 this code works with both shapefiles and postgis layers,
in QGIS 1.7 it works ONLY in postgis layers, on shapefile layers it always
returns 0 features.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110615/7e09a222/attachment.html


More information about the Qgis-developer mailing list