On 17/06/16 12:15, Tom Chadwin wrote: > > Matthias Kuhn-2 wrote > Are you working with an attribute table (or an attribute table > model) there? > > Yes. This code takes categorized 2.5d render roof colours, wall > colours, and heights, and adds them as fields into cleanedLayer, which > is GeoJSON from |writeAsVectorFormat()|: > That's not involving QgsAttributeTableModel, so this seems to be a different issue.
In your case, it's dangerous to use the feature ids from one layer and assume that they match on another layer. You will have to find a common attribute (primary key) or (I guess you create one of the two layers in your script) copy the source feature id to the copied layer. Matthias
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer