Python error when clicking apply in Layer properties of a switched Layer

Issue #309 closed
Fabian Thiel created an issue

If I switch a vector layer from one Map View to another one, go to Layer properties and click Apply, the following error occurs.

An error has occurred while executing Python code: 

RuntimeError: wrapped C/C++ object of type QgsVectorLayer has been deleted 
Traceback (most recent call last):
  File "C:/Users/ThinkPad/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 453, in 
    eLyr.rendererChanged.connect(lambda *args, eLyr=eLyr, qLyr=qLyr: self.updateHiddenLayerRenderer(eLyr, qLyr))
  File "C:/Users/ThinkPad/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 462, in updateHiddenLayerRenderer
    if qLyr.id() in QgsProject.instance().mapLayers().keys() and \
RuntimeError: wrapped C/C++ object of type QgsVectorLayer has been deleted

Comments (3)

  1. Log in to comment