Changeset 5686 in josm
- Timestamp:
- 2013-01-28T23:07:30+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r4982 r5686 342 342 } 343 343 } 344 for (Node n : cs) { 345 s.remove(n); 346 } 344 347 345 348 final HashMap<Node, Double> nC = (orientation == HORIZONTAL) ? nY : nX; … … 358 361 } 359 362 363 // At this point, the two heading nodes (if any) are horizontally aligned, i.e. they 364 // have the same y coordinate. So in general we shouldn't find them in a vertical string 365 // of segments. This can still happen in some pathological cases (see #7889). To avoid 366 // both heading nodes collapsing to one point, we simply skip this segment string and 367 // don't touch the node coordinates. 368 if (orientation == VERTICAL && headingNodes.size() == 2 && cs.containsAll(headingNodes)) { 369 continue; 370 } 371 360 372 for (Node n : cs) { 361 373 nC.put(n, average); 362 }363 364 for (Node n : cs) {365 s.remove(n);366 374 } 367 375 }
Note:
See TracChangeset
for help on using the changeset viewer.