Skip to content
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

QLR import without replacing layer UUIDs #60117

Open
gotjoshua opened this issue Jan 11, 2025 · 0 comments
Open

QLR import without replacing layer UUIDs #60117

gotjoshua opened this issue Jan 11, 2025 · 0 comments

Comments

@gotjoshua
Copy link

Feature description

in QgsLayerDefinition::loadLayerDefinition the UUID is being replaced automatically, even if no conflict exists:

// IDs of layers should be changed otherwise we may have more then one layer with the same id
// We have to replace the IDs before we load them because it's too late once they are

I am coding up a plugin that adds deterministic export and git based sync for layer groups.
I want to be able to replace an existing layer group without replacing all the UUIDs.

Additional context

In my import process, i delete the existing layer group first, so the identical layers will not be a problem. If there was an optional flag to skipIDchange it will allow the changes to the layers to remain deterministic and accurately based on changes that actually happened.
As this would be an opt-in parameter it would not change existing functionality and is a very low hanging fruit to wrap the ID replacement in an if statement. (If it was typescript, this would be a PR, but i've yet to ever compile QGIS or any c++ project for that matter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant