Changeset 2402 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-11-07T18:01:20+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r2401 r2402 783 783 784 784 public void clenupDeletedPrimitives() { 785 cleanupDeleted(nodes.iterator()); 786 cleanupDeleted(ways.iterator()); 787 cleanupDeleted(relations.iterator()); 788 } 789 790 private void cleanupDeleted(Iterator<? extends OsmPrimitive> it) { 785 if (cleanupDeleted(nodes.iterator()) 786 | cleanupDeleted(ways.iterator()) 787 | cleanupDeleted(relations.iterator())) { 788 fireSelectionChanged(); 789 } 790 } 791 792 private boolean cleanupDeleted(Iterator<? extends OsmPrimitive> it) { 793 boolean changed = false; 791 794 while (it.hasNext()) { 792 if (it.next().isDeleted()) { 795 OsmPrimitive primitive = it.next(); 796 if (primitive.isDeleted()) { 797 selectedPrimitives.remove(primitive); 798 allPrimitives.remove(primitive); 799 changed = true; 793 800 it.remove(); 794 801 } 795 802 } 803 return changed; 796 804 } 797 805
Note:
See TracChangeset
for help on using the changeset viewer.