From 315fc20f4ce5188ea67fca2f3ad6f51515e6b8f7 Mon Sep 17 00:00:00 2001
From: Jiri Vlasak <jiri.hubacek@gmail.com>
Date: Mon, 14 Nov 2022 21:35:28 +0100
Subject: [PATCH 1/2] Separate move nodes command code
---
.../openstreetmap/josm/actions/AlignInCircleAction.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/org/openstreetmap/josm/actions/AlignInCircleAction.java b/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
index 42bec22818..f3dec3f3db 100644
|
a
|
b
|
public final class AlignInCircleAction extends JosmAction {
|
| 258 | 258 | } |
| 259 | 259 | radius = radius / nodes.size(); |
| 260 | 260 | } |
| | 261 | return moveNodesCommand(nodes, fixNodes, center, radius); |
| | 262 | } |
| 261 | 263 | |
| | 264 | public static Command moveNodesCommand( |
| | 265 | List<Node> nodes, |
| | 266 | Set<Node> fixNodes, |
| | 267 | EastNorth center, |
| | 268 | double radius) throws InvalidSelection |
| | 269 | { |
| 262 | 270 | List<Command> cmds = new LinkedList<>(); |
| 263 | 271 | |
| 264 | 272 | // Move each node to that distance from the center. |