From 5d7b686eb55c70a64e64dddc208c1bc213d54e30 Mon Sep 17 00:00:00 2001 From: mamanakis Date: Sun, 25 Oct 2026 12:50:08 -0600 Subject: [PATCH] Fix scoping issue when rotating a single multipolygon member 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. --- src/Shared/EditorLayer/EditorMapLayer+Edit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Shared/EditorLayer/EditorMapLayer+Edit.swift b/src/Shared/EditorLayer/EditorMapLayer+Edit.swift index ce2554cb5..a05b93e76 100644 --- a/src/Shared/EditorLayer/EditorMapLayer+Edit.swift +++ b/src/Shared/EditorLayer/EditorMapLayer+Edit.swift @@ -490,7 +490,7 @@ extension EditorMapLayer { } else { // rotate object geometry let axis = viewPort.mapTransform.screenPoint(forLatLon: center, birdsEye: true) - let rotatedObject = selectedRelation ?? selectedWay + let rotatedObject = selectedWay ?? selectedRelation if let nodeSet = rotatedObject?.nodeSet() { for node in nodeSet { let pt = viewPort.mapTransform.screenPoint(forLatLon: node.latLon, birdsEye: true)