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

Marco Bernasocchi marco at bernawebdesign.ch
Wed Apr 27 02:32:47 PDT 2011


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, <Bernhard.Stroebl at jena.de> 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
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110427/0cb065b9/attachment.html>


More information about the Qgis-user mailing list