- Timestamp:
- 2020-02-19T09:08:57+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r15884 r15886 686 686 687 687 for (Way way : outerStartingWays) { 688 List<Way> splitWays = splitWayOnNodes(way, nodes); 689 690 // see #9599 691 if (!way.isNew() && splitWays.size() > 1) { 692 for (Way part : splitWays) { 693 Node n = part.firstNode(); 694 Way old = oldestWayMap.get(n); 695 if (old == null || old.getUniqueId() > way.getUniqueId()) { 696 oldestWayMap.put(n, way); 697 } 698 } 699 } 700 688 List<Way> splitWays = splitWayOnNodes(way, nodes, oldestWayMap); 701 689 preparedWays.addAll(markWayInsideSide(splitWays, false)); 702 690 } 703 691 704 692 for (Way way : innerStartingWays) { 705 List<Way> splitWays = splitWayOnNodes(way, nodes );693 List<Way> splitWays = splitWayOnNodes(way, nodes, oldestWayMap); 706 694 preparedWays.addAll(markWayInsideSide(splitWays, true)); 707 695 } … … 1126 1114 * @param way way to split 1127 1115 * @param nodes split points 1116 * @param oldestWayMap nodes from old ways (modified here) 1128 1117 * @return list of split ways (or original way if no splitting is done). 1129 1118 */ 1130 private List<Way> splitWayOnNodes(Way way, Set<Node> nodes ) {1119 private List<Way> splitWayOnNodes(Way way, Set<Node> nodes, Map<Node, Way> oldestWayMap) { 1131 1120 1132 1121 List<Way> result = new ArrayList<>(); … … 1144 1133 result.add(split.getOriginalWay()); 1145 1134 result.addAll(split.getNewWays()); 1135 1136 // see #9599 1137 if (!way.isNew() && result.size() > 1) { 1138 for (Way part : result) { 1139 Node n = part.firstNode(); 1140 Way old = oldestWayMap.get(n); 1141 if (old == null || old.getUniqueId() > way.getUniqueId()) { 1142 oldestWayMap.put(n, way); 1143 } 1144 } 1145 } 1146 1146 } 1147 1147 } … … 1150 1150 result.add(way); 1151 1151 } 1152 1153 1152 return result; 1154 1153 }
Note:
See TracChangeset
for help on using the changeset viewer.