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

Fix point text annotation rotation, alignment issues and expose settings to GUI #53337

Merged
merged 6 commits into from Jun 2, 2023

Conversation

nyalldawson
Copy link
Collaborator

This PR fixes a bunch of issues relating to handling rotation and text alignment of point text annotation items, which was previously available via PyQGIS but not exposed via the GUI.

whereas every other angle in qgis api is set in clockwise directions

This setting has never been exposed to users, so we are free to change
it now as it will always be 0 in any existing projects
This was supported by the annotation, but not exposed in the
widget for some reason
the text annotation should handle map rotation

Previously, text annotations just ignore map rotation, which
matches how regular map labels are handled. But this is not
desirable for some point text annotations, where it can
be considered a bug that the item ignores the map rotation (eg
when a text annotation has been placed to align with a feature
on the map, such as a road)

There's no one "correct" behaviour here, so add a new
combo box widget in the annotation point text settings with
options for
"Ignore Map Rotation"
"Rotate With Map"
so that users can pick the desired behavior for their annotations
This has been supported via raw api, but not exposed in the widget
@github-actions github-actions bot added this to the 3.32.0 milestone Jun 2, 2023
Copy link
Contributor

@nirvn nirvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. This PR is equal part fix and feature and while we've entered freeze time, I feel it's OK for it to make its way into 3.32.

@nyalldawson nyalldawson merged commit d3d0431 into qgis:master Jun 2, 2023
31 of 32 checks passed
@nyalldawson nyalldawson deleted the fix_annotation_rotation branch June 2, 2023 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants