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
_______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
