[Qgis-developer] index in self.legend.groupLayerRelationship - different behavior between QGIS 1.8 and master?

Marco Bernasocchi marco at bernawebdesign.ch
Tue Sep 25 09:22:15 PDT 2012


hi Andy,
IIRC there was a mail about somebody working there to give more control.
just looked up, it was endmax. see [1]
ciao

(1)
https://github.com/qgis/Quantum-GIS/commit/318dd7c16ba0686a02f0ae981d5c380d79466d16#src/app/legend/qgsapplegendinterface.cpp

Marco Bernasocchi (mobile)
http://opengis.ch
On Sep 25, 2012 11:06 PM, "Andreas Neumann" <a.neumann at carto.net> wrote:

> Hi,
>
> When testing a self-written plugin, I noticed a different behavior between
> QGIS 1.8 and master.
>
> I used the following code to move a layer into a certain group which I
> detected by name:
>
> here is the code:
>
>         groups = []
>         for group in self.legend.**groupLayerRelationship():
>                 groups.append(group[0])
>         groupIndex = groups.index(groupName)
>         #move new layer to existing group
>         self.legend.moveLayer(**schuelerLayer, groupIndex)
>
> While this works fine in QGIS 1.8, in QGIS master it is shifted to one
> group below the correct group. Did some behavior of the groupIndex change?
>
> Thanks,
> Andreas
>
> --
> --
> Andreas Neumann
> Böschacherstrasse 10A
> 8624 Grüt (Gossau ZH)
> Switzerland
> ______________________________**_________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120925/fccb2bc4/attachment.html>


More information about the Qgis-developer mailing list