Changeset 258 in josm for src


Ignore:
Timestamp:
2007-06-15T03:58:05+02:00 (17 years ago)
Author:
framm
Message:
  • patch by Tom Hughes <tom@…> that will first delete ways, then segments, then nodes because the API will not allow deletion of used objects in the future
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/actions/UploadAction.java

    r242 r258  
    115115                }
    116116
    117                 final Collection<OsmPrimitive> add = new LinkedList<OsmPrimitive>();
    118                 final Collection<OsmPrimitive> update = new LinkedList<OsmPrimitive>();
    119                 final Collection<OsmPrimitive> delete = new LinkedList<OsmPrimitive>();
     117                final LinkedList<OsmPrimitive> add = new LinkedList<OsmPrimitive>();
     118                final LinkedList<OsmPrimitive> update = new LinkedList<OsmPrimitive>();
     119                final LinkedList<OsmPrimitive> delete = new LinkedList<OsmPrimitive>();
    120120                for (OsmPrimitive osm : Main.ds.allPrimitives()) {
    121121                        if (osm.get("josm/ignore") != null)
    122122                                continue;
    123123                        if (osm.id == 0 && !osm.deleted)
    124                                 add.add(osm);
     124                                add.addLast(osm);
    125125                        else if (osm.modified && !osm.deleted)
    126                                 update.add(osm);
     126                                update.addLast(osm);
    127127                        else if (osm.deleted && osm.id != 0)
    128                                 delete.add(osm);
     128                                delete.addFirst(osm);
    129129                }
    130130               
Note: See TracChangeset for help on using the changeset viewer.