source: josm/trunk/test/data/regress/18367/silent-revert.osm@ 16707

Last change on this file since 16707 was 15574, checked in by GerdP, 5 years ago

fix #18367 and #18385: CombineWayAction (C) refuses to combine ways or silently reverses ways
Changes:

  • try first to combine the ways with the method Multipolygon.joinWays() If that method returns a single line string we can use it, else use the result of NodeGraph.buildSpanningPathNoRemove(). Both methods will not add or remove segments
  • if ways are combined execute checks for overlapping segments or self-intersection and show a notification popup right after the command was added to the UndoRedoHandler
  • The code which handles reversed ways needed changes. In the unpatched version it sometimes claims wrongly that ways were reversed, in special cases it sometimes silently reverted ways. The old code did not handle the case properly that a node can appear more than once. I really hope that I got it right now.
  • Fix some sonarlint issues
  • let NodeGraph routines return an ArrayList instead of a LinkedList (improves performance a bit)
  • Add unit tests
File size: 889 bytes
Line 
1<?xml version='1.0' encoding='UTF-8'?>
2<osm version='0.6' generator='JOSM'>
3 <node id='-103155' action='modify' visible='true' lat='-5.36336379389' lon='133.01215874827' />
4 <node id='-103156' action='modify' visible='true' lat='-5.36362512119' lon='133.01215243199' />
5 <node id='-103158' action='modify' visible='true' lat='-5.36358738945' lon='133.01222892916' />
6 <node id='-103160' action='modify' visible='true' lat='-5.36351747729' lon='133.01215503375' />
7 <node id='-103162' action='modify' visible='true' lat='-5.36353079183' lon='133.01211102527' />
8 <way id='-103157' action='modify' visible='true'>
9 <nd ref='-103155' />
10 <nd ref='-103160' />
11 <nd ref='-103156' />
12 <nd ref='-103158' />
13 <nd ref='-103160' />
14 </way>
15 <way id='-103163' action='modify' visible='true'>
16 <nd ref='-103162' />
17 <nd ref='-103160' />
18 </way>
19</osm>
Note: See TracBrowser for help on using the repository browser.