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

[Backport release-3_36] QgsProject: The flag to read extent from xml was set too late #57297

Merged
merged 2 commits into from May 13, 2024

Conversation

qgis-bot
Copy link
Collaborator

Backport #57219
Authored by: @rldhont

The `QgsProject::addLayer` method which add a layer from DOM layer element uses the method `projectFlagsToLayerReadFlags` to get layer read flags from project flags.
The generated layer read flags is used into the `QgsMapLayer::readLayerFromXml` method. This method read the extent from XML only if the `QgsMapLayer::FlagReadExtentFromXml`
flag is set. If it is not set, the layer extent (provided by the provider) and layer extent from xml are empty. So even if the read extent from xml is set to true for vector
layer, the extent will be always provided by the provider if the flag `QgsMapLayer::FlagReadExtentFromXml` is not provided to `QgsMapLayer::readLayerFromXml` method.

To fix it, we proposed to update `QgsProject::projectFlagsToLayerReadFlags` method to provide `QgsMapLayer::FlagReadExtentFromXml` from project flags.

Funded by Tenergie
@github-actions github-actions bot added this to the 3.36.3 milestone Apr 30, 2024
@rldhont rldhont added Data Provider Related to specific vector, raster or mesh data providers Vectors Related to general vector layer handling (not specific data formats) Server Related to QGIS server labels Apr 30, 2024
Copy link

github-actions bot commented Apr 30, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit e60e011)

@rldhont
Copy link
Contributor

rldhont commented May 1, 2024

Not related tests failed : 136 - test_core_networkaccessmanager (Timeout)

@nyalldawson nyalldawson reopened this May 13, 2024
@nyalldawson nyalldawson merged commit 6328812 into release-3_36 May 13, 2024
71 of 73 checks passed
@nyalldawson nyalldawson deleted the backport-57219-to-release-3_36 branch May 13, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Provider Related to specific vector, raster or mesh data providers Server Related to QGIS server Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants