[Qgis-developer] Layer order in TOC

motta.luiz at gmail.com motta.luiz at gmail.com
Thu Mar 11 17:36:31 EST 2010


Alexander,

I make same question before, you can see in:
http://n2.nabble.com/List-layer-from-Legend-td4416161.html#a4416161

See the comments of Martin Dobias.


Alexander Bruy escreveu:
> Hi list,
>
> is there a way to get a list of layers in the order in which they are
> listed in the TOC?
> When I use QgsMapLayerRegistry.instance().mapLayers() I get layers
> in the order different from the order in the TOC. For example in TOC
> I have layers:
> layer_01
> layer_02
> layer_03
> layer_04
> when I retrieve layer list with QgsMapLayerRegistry I got:
> layer_04
> layer_01
> layer_03
> layer_02
>
> Thanks
>   



More information about the Qgis-developer mailing list