On Mon, Feb 28, 2011 at 1:50 PM, Ziegler Stefan <[email protected]> wrote: > Hi > I'm trying to add some attributes to a memory provider but with no luck. I > pasted the code from the cookbook [1] into the python console. The layer > with the feature is added but there are no attributes in the layer. Did I > miss something? Has something changed?
It seems that the semantics has slightly changed recently with the merge of table join branch. Now the fields are stored in the layer when the layer is created, so when the provider adds new fields in the meantime, they're not propagated automatically to the layer. You have to call explicitly: layer.updateFieldMap() Probably this could be considered as a bug. Martin _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
