[QGIS-Developer] Crash for signal layerOrderChanged

Luiz Motta motta.luiz at gmail.com
Mon Oct 29 08:03:41 PDT 2018


Hi,

I need get the signal when have change of layers order of legend.

I tried use the signal of  layerOrderChanged, but, crash QGIS.
Version: 3.4
Code 4a4b62e <https://github.com/qgis/QGIS/commit/4a4b62e>
OS: Kubuntu 18.04

I used the Terminal Python:

def changeOrder():
    print('Change order')

root = QgsProject.instance().layerTreeRoot()

root.layerOrderChanged.connect(changeOrder) # Crash for normal layer

root.customLayerOrderChanged.connect(changeOrder) # None crash for normal
layer

It is a Bug ?

What is a custom layer ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20181029/b6aa4c23/attachment.html>


More information about the QGIS-Developer mailing list