[Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

Bernhard.Stroebl at jena.de Bernhard.Stroebl at jena.de
Wed Apr 27 02:15:27 PDT 2011


Hi Marco,

I updated QGIS to the last 1.7 pre-Version and this works now:
li=self.iface.legendInterface()
p=li.addGroup("Parent", False)
c1=li.addGroup("Child1", False, p)
c2=li.addGroup("Child2", False, p)

p is a valid index within li, so
li.groupExists(p) returns True

_BUT_ c1 and c2 are relative indeces within p
c1 equals 0 and c2 equals 1
thus it is not possible to add layers to the child groups because
li.groupExists(c1) returns False (given there are already a couple of 
layers in the project)

could you imagine a quick fix or do you want me to file a ticket or 
reopen https://trac.osgeo.org/qgis/ticket/3263 ?

best wishes

Bernhard


________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com



More information about the Qgis-user mailing list