-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
When duplicating a layer copy layer tree layer's custom properties [fixes #60884] #60897
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Code looks good. Did you check if any custom property used from QGIS itself might make no sense to be duplicated? Just to be sure.
There is a list of some custom properties used by QGIS with |
97c41ab
to
a5ebb3a
Compare
🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. 🪟 Windows buildsDownload Windows builds of this PR for testing. |
Description
When using Duplicate Layer in the Layers panel only the custom properties for the
QgsMapLayer
were being copied with any custom properties for the associatedQgsLayerTreeLayer
being omitted.This PR fixes that issue by copying the source layer tree layer's custom properties to the new layer tree layer.
I've tested the code and it behaves as expected. Test cases included those described in the bug report as well as with the Layer Color Plugin (which is affected by this bug).
Backporting this fix to the LTR releases would be nice.
Fixes #60884