You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Makes the annotation map tools aware of item rotation, completing the work split
out of #66610 (after #67035 and #67036).
Screen.Recording.2026-06-29.at.17.47.52.mov
QgsMapToolSelectAnnotation draws the selection band and its mouse handles
rotated together with the item, and QgsMapToolModifyAnnotation places the
vertex handles on the rotated corners and supports resizing a rotated item by
dragging one of them. The drag keeps the opposite corner fixed on screen and
reconstructs the new (axis aligned) item bounds from the un-rotated diagonal.
To apply such a resize a new QgsAnnotationItemEditOperationSetItemBounds
edit operation is added, since the existing MoveNode operation can only set a
single corner of the unrotated bounds, which is not what a rotated resize
produces.
Tests are added for moving an item on a rotated canvas, rotating an item and
resizing a rotated item.
AI tool usage
AI tool(s) (Copilot, Claude, or something similar) supported my development of this PR. See our policy about AI tool use. Use of AI tools must be indicated. Failure to be honest might result in banning.
Request for documentation
From pull request qgis/QGIS#67101
Author: @3nids
QGIS version: 4.4
Annotation rotation (part 3): rotation aware map tools
PR Description:
Description
Makes the annotation map tools aware of item rotation, completing the work split
out of #66610 (after #67035 and #67036).
Screen.Recording.2026-06-29.at.17.47.52.mov
QgsMapToolSelectAnnotationdraws the selection band and its mouse handlesrotated together with the item, and
QgsMapToolModifyAnnotationplaces thevertex handles on the rotated corners and supports resizing a rotated item by
dragging one of them. The drag keeps the opposite corner fixed on screen and
reconstructs the new (axis aligned) item bounds from the un-rotated diagonal.
To apply such a resize a new
QgsAnnotationItemEditOperationSetItemBoundsedit operation is added, since the existing
MoveNodeoperation can only set asingle corner of the unrotated bounds, which is not what a rotated resize
produces.
Tests are added for moving an item on a rotated canvas, rotating an item and
resizing a rotated item.
AI tool usage
Commits tagged with [need-docs] or [FEATURE]