Changeset 16124 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-03-14T20:37:18+01:00 (5 years ago)
Author:
Don-vip
Message:

fix #18770 - fix ProgressException with concurrent download tasks

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

Legend:

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

    r15827 r16124  
    273273        }
    274274
    275         PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download data"));
    276 
    277275        List<Future<?>> result = new ArrayList<>();
    278276        for (final DownloadTask task : tasks) {
    279277            try {
    280278                task.setZoomAfterDownload(zoomToData);
    281                 result.add(MainApplication.worker.submit(new PostDownloadHandler(task, task.loadUrl(settings, url, monitor))));
     279                result.add(MainApplication.worker.submit(new PostDownloadHandler(task, task.loadUrl(settings, url,
     280                        new PleaseWaitProgressMonitor(tr("Download data"))))));
    282281            } catch (IllegalArgumentException e) {
    283282                Logging.error(e);
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java

    r14936 r16124  
    138138    public final void run() {
    139139        if (EventQueue.isDispatchThread()) {
    140             new Thread((Runnable) this::doRealRun, getClass().getName()).start();
     140            new Thread(this::doRealRun, getClass().getName()).start();
    141141        } else {
    142142            doRealRun();
Note: See TracChangeset for help on using the changeset viewer.