Changeset 15178 in josm
- Timestamp:
- 2019-06-17T11:05:51+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
r15123 r15178 185 185 public JoinedWay(List<Node> nodes, Collection<Long> wayIds, boolean selected) { 186 186 this.nodes = new ArrayList<>(nodes); 187 this.wayIds = new ArrayList<>(wayIds); 187 // see #17819 188 if (wayIds.size() == 1) { 189 this.wayIds = Collections.singleton(wayIds.iterator().next()); 190 } else { 191 this.wayIds = wayIds.size() <= 10 ? new ArrayList<>(wayIds) : new HashSet<>(wayIds); 192 } 188 193 this.selected = selected; 189 194 } … … 638 643 --left; 639 644 if (nodes == null) { 640 nodes = w.getNodes();645 nodes = new ArrayList<>(w.getNodes()); 641 646 wayIds.add(w.getUniqueId()); 642 647 } 643 nodes.remove((mode == 21 || mode == 22) ? nl : 0);644 648 if (mode == 21) { 645 nodes.addAll(c.getNodes() );649 nodes.addAll(c.getNodes().subList(1, cl + 1)); 646 650 } else if (mode == 12) { 647 nodes.addAll(0, c.getNodes() );648 } else if (mode == 22){649 for (Node node : c.getNodes()) {650 nodes.add(nl, node);651 }652 } else /* mode == 11 */ {653 for (Node node : c.getNodes()){654 nodes.add (0, node);651 nodes.addAll(0, c.getNodes().subList(0, cl)); 652 } else { 653 ArrayList<Node> reversed = new ArrayList<>(c.getNodes()); 654 Collections.reverse(reversed); 655 if (mode == 22) { 656 nodes.addAll(reversed.subList(1, cl + 1)); 657 } else /* mode == 11 */ { 658 nodes.addAll(0, reversed.subList(0, cl)); 655 659 } 656 660 }
Note:
See TracChangeset
for help on using the changeset viewer.