[Qgis-developer] UPDATE: New Plugin - Edit Any Layer

haubourg regis.haubourg at eau-adour-garonne.fr
Thu Aug 9 07:40:29 PDT 2012


Hi Rob , 
I just published a very close plugin : EasyCustomLabeling. You made me
finish it faster ! 

One first remark, I will open a dedicated topic, not sure it is a QGIS API
bug . 
If duplicating a layer with AttributeMap() , and AddAttribute() methods, if
source layer contains oid , fid or geometry fields that are not last fields,
ID's of fields are handled differently between AttributeMap() that fetches
id's, and addattribute that write ids..  
This is quite common with postgis.
First method fetches values with id calculated without those masked fields, 
the other one sees raw id's. As a result,  attributes are not writen in the
right column. 

We found a workaround be recreating our own field indexes every time.. Have
a look at the code  http://planet.qgis.org/plugins/EasyCustomLabeling/
http://planet.qgis.org/plugins/EasyCustomLabeling/ 

Cheers, 
Régis



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/UPDATE-New-Plugin-Edit-Any-Layer-tp4993854p4994180.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list