Open PeterDrexel opened 2 months ago
Same happens if you open the .qlr
by drag and drop.
The QgsLayerTreeRegistryBridge
in the profile widget relies on the QgsProject::legendLayersAdded()
signal in order to be kept updated.
The signal is not fired in .qlr
loading code, since loadInLegend
is set to false
:
https://github.com/qgis/QGIS/blob/5215f3351a140ef942a9ff1b64623fcaf26df683/src/core/qgslayerdefinition.cpp#L173-L183
What is the bug or the crash?
Using "Log = QgsLayerDefinition().loadLayerDefinition("pathtofile/xxx.qlr", QgsProject.instance(),QgsProject.instance().layerTreeRoot())" in a Script or in the Python-Console works well to open some elevation data into the layer table and the main view. But if I want to see the same Data in an Elevation-Profile-View the dataset does not show up in an already opened Elevation-Profile-View. I have to close and reopen the Elevation Profile View to see the loaded Dataset.
Steps to reproduce the issue
Start QGIS
Versions
3.38.2
Supported QGIS version
New profile
Additional context
No response