- Timestamp:
- 2020-10-17T10:12:29+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java
r17140 r17220 20 20 import javax.swing.table.DefaultTableModel; 21 21 22 import org.openstreetmap.josm.command.Change Command;22 import org.openstreetmap.josm.command.ChangeMembersCommand; 23 23 import org.openstreetmap.josm.command.Command; 24 24 import org.openstreetmap.josm.data.osm.Node; … … 364 364 365 365 protected Command buildResolveCommand(Relation relation, OsmPrimitive newPrimitive) { 366 final Relation modifiedRelation = new Relation(relation); 367 modifiedRelation.setMembers(null); 366 List<RelationMember> modifiedMemberList = new ArrayList<>(); 368 367 boolean isChanged = false; 369 368 for (int i = 0; i < relation.getMembersCount(); i++) { … … 371 370 RelationMemberConflictDecision decision = getDecision(relation, i); 372 371 if (decision == null) { 373 modified Relation.addMember(member);372 modifiedMemberList.add(member); 374 373 } else { 375 374 switch(decision.getDecision()) { 376 375 case KEEP: 377 376 final RelationMember newMember = new RelationMember(decision.getRole(), newPrimitive); 378 modified Relation.addMember(newMember);377 modifiedMemberList.add(newMember); 379 378 isChanged |= !member.equals(newMember); 380 379 break; … … 389 388 } 390 389 } 391 if (isChanged) 392 return new ChangeCommand(relation, modifiedRelation); 393 modifiedRelation.setMembers(null); // see #19885 394 return null; 390 return isChanged ? new ChangeMembersCommand(relation, modifiedMemberList) : null; 395 391 } 396 392
Note:
See TracChangeset
for help on using the changeset viewer.