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

main annotation layer should be used as a valid option even if type hint is set to UnknownType (fix #49010) #60341

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

alexbruy
Copy link
Contributor

Description

If Processing algorithm uses multiple layers parameter with Qgis::ProcessingSourceType::MapLayer type, annotation layers are should be considered as a valid choice. However, this will fail with the main annotation layer which exists in all projects by default.

The mapLayerFromString() method will return true only if type hint is explicitly set to Annotation. In case of multiple layers input we check parameter value using the UnknownType type hint and main annotation layer won't be considered as a valid parameter value.

Fixes #49010.

@alexbruy alexbruy added Processing Relating to QGIS Processing framework or individual Processing algorithms backport release-3_40 labels Jan 29, 2025
@alexbruy alexbruy requested a review from nyalldawson January 29, 2025 12:26
@github-actions github-actions bot added this to the 3.42.0 milestone Jan 29, 2025
Copy link

github-actions bot commented Jan 29, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 823f9c5)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 823f9c5)

@alexbruy alexbruy force-pushed the processing-main-annotation-layer branch from c5a17b9 to c830ee1 Compare February 3, 2025 08:32
@alexbruy alexbruy force-pushed the processing-main-annotation-layer branch from a31650e to 32bf17e Compare February 3, 2025 12:11
@nyalldawson nyalldawson merged commit ff09724 into qgis:master Feb 5, 2025
31 checks passed
@alexbruy alexbruy deleted the processing-main-annotation-layer branch February 5, 2025 11:05
@kannes
Copy link
Contributor

kannes commented Feb 5, 2025

Thank you @alexbruy !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3_40 Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export Layer(s) Information processing tool suggests unsupported Annotations layer as input
3 participants