Changeset 233 in josm for src/org/openstreetmap


Ignore:
Timestamp:
2007-05-08T22:34:53+02:00 (18 years ago)
Author:
framm
Message:

Do not clear the command history if an upload fails completely.
Fixes #138.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r224 r233  
    228228         */
    229229        public void cleanData(final Collection<OsmPrimitive> processed, boolean dataAdded) {
     230
     231                // return immediately if nothing really happened (typically when upload
     232                // aborts due to a server connection error)
     233                if ((processed == null || processed.isEmpty()) && !dataAdded)
     234                        return;
     235               
    230236                redoCommands.clear();
    231237                commands.clear();
     
    243249
    244250                // update the modified flag
    245 
    246251                if (fromDisk && processed != null && !dataAdded)
    247252                        return; // do nothing when uploading non-harmful changes.
Note: See TracChangeset for help on using the changeset viewer.