Changeset 8443 in josm for trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
- Timestamp:
- 2015-06-02T16:40:38+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r8378 r8443 101 101 try { 102 102 for (OsmPrimitive p : sel) { 103 if (! 103 if (!(p instanceof Node)) throw new InvalidUserInputException(); 104 104 Node n = (Node) p; 105 105 if (rememberMovements.containsKey(n)) { 106 106 EastNorth tmp = rememberMovements.get(n); 107 commands.add(new MoveCommand(n, - tmp.east(), -tmp.north()));107 commands.add(new MoveCommand(n, -tmp.east(), -tmp.north())); 108 108 rememberMovements.remove(n); 109 109 } … … 299 299 // rotate 300 300 for (Node n: allNodes) { 301 EastNorth tmp = EN.rotateCC(pivot, n.getEastNorth(), - 301 EastNorth tmp = EN.rotateCC(pivot, n.getEastNorth(), -headingAll); 302 302 nX.put(n, tmp.east()); 303 303 nY.put(n, tmp.north()); … … 328 328 Node n2 = w.way.getNodes().get(i+1); 329 329 if (Arrays.asList(orientation).contains(w.segDirections[i])) { 330 if (cs.contains(n1) && ! 330 if (cs.contains(n1) && !cs.contains(n2)) { 331 331 cs.add(n2); 332 332 somethingHappened = true; 333 333 } 334 if (cs.contains(n2) && ! 334 if (cs.contains(n2) && !cs.contains(n1)) { 335 335 cs.add(n1); 336 336 somethingHappened = true; … … 468 468 } 469 469 // rotate the vertical vector by 90 degrees (clockwise) and add it to the horizontal vector 470 segSum = EN.sum(h, new EastNorth(v.north(), - 470 segSum = EN.sum(h, new EastNorth(v.north(), -v.east())); 471 471 // if (EN.abs(segSum) < lh) throw new AssertionError(); 472 472 this.heading = EN.polar(new EastNorth(0.,0.), segSum); … … 505 505 a -= 2 * Math.PI; 506 506 } 507 while (a <= - 507 while (a <= -Math.PI) { 508 508 a += 2 * Math.PI; 509 509 }
Note:
See TracChangeset
for help on using the changeset viewer.