Ticket #637: nodoubleadd.diff
File nodoubleadd.diff, 824 bytes (added by , 17 years ago) |
---|
-
src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java
292 292 293 293 private void addSelected() { 294 294 for (OsmPrimitive p : Main.ds.getSelected()) { 295 RelationMember em = new RelationMember(); 296 em.member = p; 297 em.role = ""; 298 clone.members.add(em); 295 boolean skip = false; 296 for (RelationMember rm : clone.members) { 297 if (rm.member == p) 298 { 299 skip = true; 300 break; 301 } 302 } 303 if(!skip) 304 { 305 RelationMember em = new RelationMember(); 306 em.member = p; 307 em.role = ""; 308 clone.members.add(em); 309 } 299 310 } 300 311 refreshTables(); 301 312 }