Want to bring the active layer to top of the legend interface layer list.
Asked
Active
Viewed 263 times
0
Want to bring the active layer to top of the legend interface layer list.
iface1.setActiveLayer(layer) iface1.legendInterface().moveLayer(layer, 0) – drama Jun 12 '17 at 12:44
alayer = QgsMapLayerRegistry.instance().mapLayersByName("Layer2")[0]withalayer = iface.activeLayer()then use the code to movealayer. "root" is not a layer, it's the name given to the layers panel essentially. – Joseph Jun 12 '17 at 12:55