Changeset 17221 in josm
- Timestamp:
- 2020-10-17T10:23:03+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
r16761 r17221 19 19 import java.util.stream.IntStream; 20 20 21 import org.openstreetmap.josm.command.Change Command;21 import org.openstreetmap.josm.command.ChangeMembersCommand; 22 22 import org.openstreetmap.josm.command.Command; 23 23 import org.openstreetmap.josm.data.coor.EastNorth; … … 743 743 if (primitives.size() >= 2 && primitives.get(0) instanceof Relation) { 744 744 Relation oldRel = (Relation) primitives.get(0); 745 Relation newRel = new Relation(oldRel);746 745 List<OsmPrimitive> repeatedPrims = primitives.subList(1, primitives.size()); 747 746 List<RelationMember> oldMembers = oldRel.getMembers(); … … 752 751 for (RelationMember rm : oldMembers) { 753 752 if (toRemove.contains(rm.getMember())) { 754 if (!found.contains(rm.getMember())) { 755 found.add(rm.getMember()); 753 if (found.add(rm.getMember())) { 756 754 newMembers.add(rm); 757 755 } … … 760 758 } 761 759 } 762 newRel.setMembers(newMembers); 763 return new ChangeCommand(oldRel, newRel); 760 return new ChangeMembersCommand(oldRel, newMembers); 764 761 } 765 762 }
Note:
See TracChangeset
for help on using the changeset viewer.