Ignore:
Timestamp:
2009-08-03T15:00:34+02:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3158: modify status is not removed for partial uploads

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

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

    r1890 r1894  
    216216                return;
    217217            }
    218             layer.cleanData(null, false);
     218            layer.cleanupAfterSaveToDisk();
    219219        } catch (IOException e) {
    220220            e.printStackTrace();
  • trunk/src/org/openstreetmap/josm/actions/UploadAction.java

    r1885 r1894  
    235235        );
    236236        switch(ret) {
    237         case JOptionPane.CLOSED_OPTION: return;
    238         case JOptionPane.CANCEL_OPTION: return;
    239         case 0: synchronizePrimitive(id); break;
    240         case 1: synchronizeDataSet(); break;
    241         default:
    242             // should not happen
    243             throw new IllegalStateException(tr("unexpected return value. Got {0}", ret));
     237            case JOptionPane.CLOSED_OPTION: return;
     238            case JOptionPane.CANCEL_OPTION: return;
     239            case 0: synchronizePrimitive(id); break;
     240            case 1: synchronizeDataSet(); break;
     241            default:
     242                // should not happen
     243                throw new IllegalStateException(tr("unexpected return value. Got {0}", ret));
    244244        }
    245245    }
     
    274274        );
    275275        switch(ret) {
    276         case JOptionPane.CLOSED_OPTION: return;
    277         case 1: return;
    278         case 0: synchronizeDataSet(); break;
    279         default:
    280             // should not happen
    281             throw new IllegalStateException(tr("unexpected return value. Got {0}", ret));
     276            case JOptionPane.CLOSED_OPTION: return;
     277            case 1: return;
     278            case 0: synchronizeDataSet(); break;
     279            default:
     280                // should not happen
     281                throw new IllegalStateException(tr("unexpected return value. Got {0}", ret));
    282282        }
    283283    }
     
    537537            try {
    538538                writer.uploadOsm(getCurrentDataSet().version, toUpload, progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
    539                 getEditLayer().cleanData(writer.processed, !toUpload.isEmpty());
    540539            } catch (Exception sxe) {
    541540                if (uploadCancelled) {
     
    550549            if (uploadCancelled)
    551550                return;
     551
     552            // we always clean the data, even in case of errors. It's possible the data was
     553            // partially uploaded
     554            //
     555            getEditLayer().cleanupAfterUpload(writer.getProcessedPrimitives());
    552556            if (lastException != null) {
    553557                handleFailedUpload(lastException);
Note: See TracChangeset for help on using the changeset viewer.