Skip to content

Fix scoping issue when rotating a single multipolygon member - #1038

Merged
bryceco merged 1 commit into
bryceco:masterfrom
mamanakis:fix/multipolygon-member-rotation
Oct 25, 2026
Merged

bryceco merged 1 commit into
bryceco:masterfrom
mamanakis:fix/multipolygon-member-rotation

Conversation

@mamanakis

Copy link
Copy Markdown
Contributor

Fixes #1037

Currently, when drilling down to select a single member (way) of a multipolygon, rotating the object incorrectly rotates the entire parent relation instead of just the selected member. This PR aligns the rotation scoping with the existing translation (move) scoping.

In EditorMapLayer+Edit.swift, drill-down selections set selectedWay but leave selectedRelation active. The rotateContinue method was evaluating the target as selectedRelation ?? selectedWay, which allowed the parent relation to improperly override the specific member selection. Flipping this to selectedWay ?? selectedRelation ensures the specific way selection is respected, while preserving the fallback behavior for full-relation rotations and maintaining the ability to pivot a way around a selected node.

Note: I do not have a macOS/Xcode environment to compile this iOS app locally. The proposed fix in EditorMapLayer+Edit.swift reverses the selectedRelation ?? selectedWay coalescing to respect drill-down selections.

Maintainer request: Please compile and verify that rotating a single multipolygon member works as intended, and that pivoting a way around a specifically selected node remains functional.

Currently, when drilling down to select a single member (way) of a multipolygon, rotating the object incorrectly rotates the entire parent relation instead of just the selected member. This PR aligns the rotation scoping with the existing translation (move) scoping.

In EditorMapLayer+Edit.swift, drill-down selections set selectedWay but leave selectedRelation active. The rotateContinue method was evaluating the target as selectedRelation ?? selectedWay, which allowed the parent relation to improperly override the specific member selection. Flipping this to selectedWay ?? selectedRelation ensures the specific way selection is respected, while preserving the fallback behavior for full-relation rotations and maintaining the ability to pivot a way around a selected node.

Note: I do not have a macOS/Xcode environment to compile this iOS app locally. The proposed fix in EditorMapLayer+Edit.swift reverses the selectedRelation ?? selectedWay coalescing to respect drill-down selections.

Maintainer request: Please compile and verify that rotating a single multipolygon member works as intended, and that pivoting a way around a specifically selected node remains functional.
@bryceco

bryceco commented Oct 25, 2026

Copy link
Copy Markdown
Owner

This looks great, thanks!

@bryceco
bryceco merged commit 4059820 into bryceco:master Oct 25, 2026
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.

Bug: Rotating a single member of a multipolygon incorrectly rotates all members (v6201)

2 participants