Ticket #19375: 19375.patch

File 19375.patch, 1.6 KB (added by GerdP, 3 years ago)
  • src/org/openstreetmap/josm/actions/downloadtasks/ChangesetContentDownloadTask.java

     
    6565                    }
    6666                    if (isCanceled())
    6767                        return;
    68                     getProgressMonitor().setCustomText(tr("({0}/{1}) Downloading content for changeset {2}...", i, toDownload.size(), id));
    69                     ChangesetDataSet ds = reader.downloadChangeset(id, getProgressMonitor().createSubTaskMonitor(0, false));
    7068                    Changeset cs = ChangesetCache.getInstance().get(id);
    71                     cs.setContent(ds);
    72                     ChangesetCache.getInstance().update(cs);
     69                    if (cs == null || cs.getContent() == null || cs.getClosedAt() == null) {
     70                        getProgressMonitor().setCustomText(tr("({0}/{1}) Downloading content for changeset {2}...", i, toDownload.size(), id));
     71                        ChangesetDataSet ds = reader.downloadChangeset(id, getProgressMonitor().createSubTaskMonitor(0, false));
     72                        cs = ChangesetCache.getInstance().get(id);
     73                        cs.setContent(ds);
     74                        ChangesetCache.getInstance().update(cs);
     75                    }
    7376                    downloadedChangesets.add(cs);
    7477                    getProgressMonitor().worked(1);
    7578                }