- Timestamp:
- 2018-09-16T01:54:22+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r14153 r14252 31 31 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 32 32 import org.openstreetmap.josm.gui.util.GuiHelper; 33 import org.openstreetmap.josm.io.UploadStrategySpecification; 33 34 import org.openstreetmap.josm.spi.preferences.Config; 34 35 import org.openstreetmap.josm.tools.ImageProvider; … … 246 247 dialog.setVisible(true); 247 248 dialog.rememberUserInput(); 248 if (dialog.isCanceled()) 249 return; 249 if (dialog.isCanceled()) { 250 dialog.clean(); 251 return; 252 } 250 253 251 254 for (UploadHook hook : LATE_UPLOAD_HOOKS) { 252 if (!hook.checkUpload(apiData)) 255 if (!hook.checkUpload(apiData)) { 256 dialog.clean(); 253 257 return; 258 } 254 259 } 255 260 256 261 // Any hooks want to change the changeset tags? 257 Changeset cs = UploadDialog.getUploadDialog().getChangeset();262 Changeset cs = dialog.getChangeset(); 258 263 Map<String, String> changesetTags = cs.getKeys(); 259 264 for (UploadHook hook : UPLOAD_HOOKS) { … … 264 269 } 265 270 271 UploadStrategySpecification uploadStrategySpecification = dialog.getUploadStrategySpecification(); 272 dialog.clean(); 273 266 274 if (Config.getPref().getBoolean(IS_ASYNC_UPLOAD_ENABLED, true)) { 267 275 Optional<AsynchronousUploadPrimitivesTask> asyncUploadTask = AsynchronousUploadPrimitivesTask.createAsynchronousUploadTask( 268 UploadDialog.getUploadDialog().getUploadStrategySpecification(), 269 layer, 270 apiData, 271 cs); 276 uploadStrategySpecification, layer, apiData, cs); 272 277 273 278 if (asyncUploadTask.isPresent()) { … … 275 280 } 276 281 } else { 277 MainApplication.worker.execute( 278 new UploadPrimitivesTask( 279 UploadDialog.getUploadDialog().getUploadStrategySpecification(), 280 layer, 281 apiData, 282 cs)); 282 MainApplication.worker.execute(new UploadPrimitivesTask(uploadStrategySpecification, layer, apiData, cs)); 283 283 } 284 284 }
Note:
See TracChangeset
for help on using the changeset viewer.