Changeset 18468 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode
- Timestamp:
- 2022-06-06T20:35:45+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r18456 r18468 725 725 MoveCommand moveCmd = null; 726 726 if (c instanceof MoveCommand && affectedNodes.equals(((MoveCommand) c).getParticipatingPrimitives())) { 727 EastNorth clampedEastNorth = currentEN; 728 if (platformMenuShortcutKeyMask) { 729 Way w = ds.getLastSelectedWay(); 730 if (w != null && w.getNodesCount() == 2) { 731 double clamph = w.firstNode().getEastNorth().heading(w.lastNode().getEastNorth()); 732 double dh = startEN.heading(currentEN, clamph); 733 switch ((int) (dh / (Math.PI/4))) { 734 case 1: 735 case 2: 736 dh -= Math.PI/2; 737 break; 738 case 3: 739 case 4: 740 dh += Math.PI; 741 break; 742 case 5: 743 case 6: 744 dh += Math.PI/2; 745 break; 746 } 747 clampedEastNorth = currentEN.rotate(startEN, -dh); 748 } 749 } 727 750 moveCmd = (MoveCommand) c; 728 751 moveCmd.saveCheckpoint(); 729 moveCmd.applyVectorTo(c urrentEN);752 moveCmd.applyVectorTo(clampedEastNorth); 730 753 } else if (!selection.isEmpty()) { 731 754 moveCmd = new MoveCommand(selection, startEN, currentEN);
Note:
See TracChangeset
for help on using the changeset viewer.
