[Qgis-developer] iface.mapCanvas().setCurrentLayer does not update legend
Richard Duivenvoorde
rdmailings at duif.net
Mon Feb 27 04:46:43 PST 2017
Hi Devs,
using:
iface.mapCanvas().setCurrentLayer(l)
in a python plugin works (as calling 'currentLayer()' returns l as
active layer),
BUT the legend is showing that l is the currentLayer (it does not make
the background bleu)..
I found that:
iface.legendInterface().setCurrentLayer(l)
works though.
So Question: is this a bug in the first call?
Or is that not to be used (anymore, after the legend overhaul)?
And then there is also:
iface.activeLayer() ?
Is there a difference between active and currentlayer?
If not, this is maybe a place to get a cleanup for 3.0?
Regards,
Richard Duivenvoorde
More information about the Qgis-developer
mailing list