Changeset 14252 in josm for trunk/src


Ignore:
Timestamp:
2018-09-16T01:54:22+02:00 (6 years ago)
Author:
Don-vip
Message:

one file missed

File:
1 edited

Legend:

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

    r14153 r14252  
    3131import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    3232import org.openstreetmap.josm.gui.util.GuiHelper;
     33import org.openstreetmap.josm.io.UploadStrategySpecification;
    3334import org.openstreetmap.josm.spi.preferences.Config;
    3435import org.openstreetmap.josm.tools.ImageProvider;
     
    246247        dialog.setVisible(true);
    247248        dialog.rememberUserInput();
    248         if (dialog.isCanceled())
    249             return;
     249        if (dialog.isCanceled()) {
     250            dialog.clean();
     251            return;
     252        }
    250253
    251254        for (UploadHook hook : LATE_UPLOAD_HOOKS) {
    252             if (!hook.checkUpload(apiData))
     255            if (!hook.checkUpload(apiData)) {
     256                dialog.clean();
    253257                return;
     258            }
    254259        }
    255260
    256261        // Any hooks want to change the changeset tags?
    257         Changeset cs = UploadDialog.getUploadDialog().getChangeset();
     262        Changeset cs = dialog.getChangeset();
    258263        Map<String, String> changesetTags = cs.getKeys();
    259264        for (UploadHook hook : UPLOAD_HOOKS) {
     
    264269        }
    265270
     271        UploadStrategySpecification uploadStrategySpecification = dialog.getUploadStrategySpecification();
     272        dialog.clean();
     273
    266274        if (Config.getPref().getBoolean(IS_ASYNC_UPLOAD_ENABLED, true)) {
    267275            Optional<AsynchronousUploadPrimitivesTask> asyncUploadTask = AsynchronousUploadPrimitivesTask.createAsynchronousUploadTask(
    268                     UploadDialog.getUploadDialog().getUploadStrategySpecification(),
    269                     layer,
    270                     apiData,
    271                     cs);
     276                    uploadStrategySpecification, layer, apiData, cs);
    272277
    273278            if (asyncUploadTask.isPresent()) {
     
    275280            }
    276281        } 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));
    283283        }
    284284    }
Note: See TracChangeset for help on using the changeset viewer.