Changeset 2613 in josm for trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
- Timestamp:
- 2009-12-11T23:07:59+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
r2599 r2613 18 18 import org.openstreetmap.josm.data.APIDataSet; 19 19 import org.openstreetmap.josm.data.osm.Changeset; 20 import org.openstreetmap.josm.data.osm.ChangesetCache; 20 21 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 22 import org.openstreetmap.josm.gui.DefaultNameFormatter; … … 139 140 // make sure the current changeset is removed from the upload dialog. 140 141 // 141 UploadDialog.getUploadDialog().removeChangeset(changeset);142 ChangesetCache.getInstance().update(changeset); 142 143 Changeset newChangeSet = new Changeset(); 143 144 newChangeSet.setKeys(this.changeset.getKeys()); … … 211 212 layer.fireDataChange(); 212 213 layer.onPostUploadToServer(); 213 214 // make sure the upload dialog lists all known open changesets 215 // 216 if (lastException != null && lastException instanceof ChangesetClosedException) { 217 UploadDialog.getUploadDialog().removeChangeset(changeset); 218 } else { 219 UploadDialog.getUploadDialog().updateListOfChangesetsAfterUploadOperation(changeset); 220 } 214 ChangesetCache.getInstance().update(changeset); 221 215 } 222 216 }; … … 298 292 if (uploadCancelled) 299 293 return; 300 if (lastException == null)301 return;302 294 303 295 // depending on the success of the upload operation and on the policy for … … 309 301 Runnable r = new Runnable() { 310 302 public void run() { 303 // if the changeset is still open after this upload we want it to 304 // be selected on the next upload 305 // 306 ChangesetCache.getInstance().update(changeset); 307 if (changeset != null && changeset.isOpen()) { 308 UploadDialog.getUploadDialog().setSelectedChangesetForNextUpload(changeset); 309 } 310 if (lastException == null) 311 return; 311 312 if (lastException instanceof ChangesetClosedException) { 312 313 ChangesetClosedException e = (ChangesetClosedException)lastException; … … 337 338 } 338 339 }; 339 SwingUtilities.invokeLater(r); 340 if (SwingUtilities.isEventDispatchThread()) { 341 r.run(); 342 } else { 343 SwingUtilities.invokeLater(r); 344 } 340 345 } 341 346
Note:
See TracChangeset
for help on using the changeset viewer.
