Changeset 9528 in josm for trunk/src/org


Ignore:
Timestamp:
2016-01-18T20:33:54+01:00 (9 years ago)
Author:
simon04
Message:

fix #11305 see #10306 - After canceling upload a new instead of the existing still open changeset is used on next upload

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java

    r9527 r9528  
    2626import org.openstreetmap.josm.gui.HelpAwareOptionPane;
    2727import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
    28 import org.openstreetmap.josm.gui.JosmUserIdentityManager;
    2928import org.openstreetmap.josm.gui.Notification;
    3029import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    295294                }
    296295            }
    297             // update the user information
    298             if (changeset.getUser() == null) {
    299                 changeset.setUser(JosmUserIdentityManager.getInstance().asUser());
    300             }
    301296            // if required close the changeset
    302297            //
     
    316311
    317312    @Override protected void finish() {
    318         if (uploadCanceled)
    319             return;
    320313
    321314        // depending on the success of the upload operation and on the policy for
     
    335328                    UploadDialog.getUploadDialog().setSelectedChangesetForNextUpload(changeset);
    336329                }
     330                if (uploadCanceled) return;
    337331                if (lastException == null) {
    338332                    new Notification(
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r9231 r9528  
    1515import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1616import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     17import org.openstreetmap.josm.gui.JosmUserIdentityManager;
    1718import org.openstreetmap.josm.gui.io.UploadStrategySpecification;
    1819import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
     
    204205            if (changeset.getId() == 0) {
    205206                api.openChangeset(changeset, monitor.createSubTaskMonitor(0, false));
     207                // update the user information
     208                changeset.setUser(JosmUserIdentityManager.getInstance().asUser());
    206209            } else {
    207210                api.updateChangeset(changeset, monitor.createSubTaskMonitor(0, false));
Note: See TracChangeset for help on using the changeset viewer.