Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-02-07 Thread Larry Shaffer
Hi Andreas, On Wed, Feb 6, 2013 at 5:45 AM, Andreas Neumann a.neum...@carto.net wrote: Hi, I changed the data-defined labeling in most of my projects - was a couple of hours of work. I would assume I am not the only one. Luckily, the cadastral map is just linked (embedded layers) and not

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-02-06 Thread Martin Dobias
Hi Larry On Wed, Feb 6, 2013 at 4:25 AM, Larry Shaffer lar...@dakotacarto.com wrote: Is mFields[i].originIndex (where mFields is a QgsFields vector) the same index used for the keys in QgsFieldMap? No, it's not the same thing. originIndex is a mapping from layer's attribute indices to

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-02-06 Thread Larry Shaffer
Hi Martin, On Wed, Feb 6, 2013 at 1:17 AM, Martin Dobias wonder...@gmail.com wrote: Hi Larry On Wed, Feb 6, 2013 at 4:25 AM, Larry Shaffer lar...@dakotacarto.com wrote: Is mFields[i].originIndex (where mFields is a QgsFields vector) the same index used for the keys in QgsFieldMap? No,

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-02-06 Thread Martin Dobias
On Wed, Feb 6, 2013 at 10:20 AM, Larry Shaffer lar...@dakotacarto.com wrote: Thanks for the explanation. Figured it wouldn't be that simple. So, is it worth the effort to fix this (the 1.8 to 2.0 index issue)? I think many users will find manually updating their data defined mappings, for every

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-02-06 Thread Larry Shaffer
Hi Martin, On Wed, Feb 6, 2013 at 2:53 AM, Martin Dobias wonder...@gmail.com wrote: On Wed, Feb 6, 2013 at 10:20 AM, Larry Shaffer lar...@dakotacarto.com wrote: Thanks for the explanation. Figured it wouldn't be that simple. So, is it worth the effort to fix this (the 1.8 to 2.0 index

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-02-06 Thread Andreas Neumann
Hi, I changed the data-defined labeling in most of my projects - was a couple of hours of work. I would assume I am not the only one. Luckily, the cadastral map is just linked (embedded layers) and not duplicated. The more annoying thing is that QGIS crashes frequently because of these bad

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-02-06 Thread Larry Shaffer
Hi Martin, On Wed, Feb 6, 2013 at 3:38 AM, Larry Shaffer lar...@dakotacarto.comwrote: Hi Martin, On Wed, Feb 6, 2013 at 2:53 AM, Martin Dobias wonder...@gmail.com wrote: On Wed, Feb 6, 2013 at 10:20 AM, Larry Shaffer lar...@dakotacarto.com wrote: Thanks for the explanation. Figured it

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-02-05 Thread Larry Shaffer
Hi, martin Dobias wrote: 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

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-01-31 Thread Marco Hugentobler
Hi Larry So, is anyone working on this? I can devote some time this coming weekend. Pretty important to fix this, then make it compatible with 2.0 projects. Thanks for looking into this .+1 Similarly, data defined properties are only a 1-to-1 relationship (currently property-to-field

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-01-30 Thread Larry Shaffer
Hi, On Mon, Jan 28, 2013 at 6:17 AM, Régis Haubourg regis.haubo...@eau-adour-garonne.fr wrote: martin Dobias wrote 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

[Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-01-28 Thread Andreas Neumann
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

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-01-28 Thread Matthias Kuhn
Note: This could be related to the following fix for a failed test: https://github.com/qgis/Quantum-GIS/pull/405 I issued a pull request, because the test didn't fail due to a problem in diagram itself. It might be good to implement a test for this specific issue as well. Would be easy to

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-01-28 Thread Martin Dobias
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

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-01-28 Thread Jürgen E . Fischer
Hi Andreas, On Mon, 28. Jan 2013 at 10:30:28 +0100, Andreas Neumann wrote: 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?

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-01-28 Thread Andreas Neumann
Hi all, Thank you Martin and Jürgen for your explanation. Sounds logical to me. As a longer time QGIS user I remember that I had the problem of shifted columns in the field widgets (this was fixed by Jürgen quite some time ago) and that I had troubles with the shifted columns in data-defined

Re: [Qgis-developer] Labeling: data-defined fields shifted after new vector API?

2013-01-28 Thread Régis Haubourg
martin Dobias wrote 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 Hi all, +1 for switching storage of data defined fields