Hi Andreas On Mon, Jan 28, 2013 at 10:30 AM, Andreas Neumann <a.neum...@carto.net> wrote: > Hi, > > In some of my projects data-defined values for labeling (like font-color, > rotation fields) are now failing - the order of the column assignments are > shifted by one column. Perhaps the new Vector API is the cause? My data > comes from the Postgis data provider. I am testing in the version 74ace4ad21 > from January 27. > > I checked with an older version from last week (the version starting with > 298f0c000e from January 25) and the labeling is still working ok. > > Martin or Marco - could either one of you please have a look what may be > causing this problem?
I have briefly looked into the code and it seems that new labeling stores data-defined attributes by index instead of name. If so, that's the source of the problem and it should be changed to read/write names so that if the order of fields change, the projects work correctly. Old labeling should not have this problem as it always saves field names. The source of the problem is that before, it was possible to have "holes" in attribute field indices: e.g. three attributes with indices 0,2,3. Whether such holes appeared depended on the provider being used. The support for holes has been removed for performance and simplicity - many developers were not even aware of this thing. As a quick fix I think you'll need to update your project file. The proper fix should change writing of attributes as names in data-defined properties (for new labeling). Regards Martin _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer