mardi 24 mars 2015

Something changed in QgsVectorDataProvider().changeAttributeValues() in QGIS 2.8?


I have a plugin that works with QGIS 2.2 but does not work with 2.8. Only deleteFeatures() works fine, but changeAttributeValues(), changeGeometryValues() and addFeatures() not.


I receive r == False on the code below. The layer is an SpatiaLite table.



for feat_vias in lay_vias.getFeatures(req):

if feat_vias.attributes()[idx_pkvia] == div_rowid:
fid = feat_vias.id()
attrs = { idx_setvia : s_geocodi }
r = lay_vias.dataProvider().changeAttributeValues({ fid : attrs })


I'm using QGIS 2.8.1 - Windows





Aucun commentaire:

Enregistrer un commentaire