Ignore:
Timestamp:
2018-11-16T21:51:56+01:00 (6 years ago)
Author:
wiktorn
Message:

Fix canceling precaching imageries along GPX track

  • when GPX is big it was possibile to cancel task before precacheTask was set in

PrecacheWmsTask.realRun(). This caused NPE and prevented cleaning download
queue

  • PrecacheTask.tileLoadingFinished updated progress monitor even if task was

already cancelled and this led to invalid state exception in ProgressMonitor,
as there are many download tasks run in parallel and we do not cancel them if
they already started. Now, after download is cancelled, no updates are issued

Closes: #16966

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackAction.java

    r14336 r14427  
    6060        @Override
    6161        protected void realRun() throws SAXException, IOException, OsmTransferException {
    62             precacheTask = layer.downloadAreaToCache(progressMonitor, points, 0, 0);
     62            precacheTask = layer.getDownloadAreaToCacheTask(progressMonitor, points, 0, 0);
     63            precacheTask.run();
    6364            synchronized (this) {
    6465                try {
Note: See TracChangeset for help on using the changeset viewer.