-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[elevation Profile] Correcly add a layer generated by a processing #59850
base: master
Are you sure you want to change the base?
Conversation
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
Indeed 😆 (not to mention it's only a partial fix -- if the layers are being placed in a specific group then the fix won't work either). It makes me nervous seeing a lot of changes to
Maybe we could work around this by moving the logic postprocessing which adds the layers to the tree directly to QgsLayerTreeRegistryBridge. I.e this loop: https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/Postprocessing.py#L280-L296 |
Could you explain a little bit how this could be achieved please? I don't know how |
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
Issue
This is somewhat similar to #59809
Solution
This is because
QgsLayerTreeRegistryBridge
listens to theQgsProject::legendLayersAdded()
signal in order to update the elevation profile tree view. However this signal is not triggered by the current logic in thePostprocessing.py
.This PR changes the behavior of
Postprocessing.py
. by triggering theQgsProject::legendLayersAdded()
signal and removing the duplicated node in the tree view.This seems like a bad solution but I'm not sure what the correct fix. Should
QgsLayerTreeRegistryBridge
listen to an other signal? Which one? ShouldPostprocessing.py
be modified?Any thoughts?
cc @Djedouas