Hi Marco,

so this will be the QgsLegendInterface redesign you discussed for the past 1.7 release. I can live without until then :)

thank you for your effort

Bernhard

Am 27.04.2011 11:32, schrieb Marco Bernasocchi:
Hi bernhard,
This is a known limitation wiht all the methods of that interface. See the
ticket for details.
Ciao
On 27 Apr 2011 11:15,<[email protected]>  wrote:
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
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to