Changeset 15332 in josm for trunk


Ignore:
Timestamp:
2019-09-02T20:26:11+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #18105 - Show a notification if no notes can be downloaded

File:
1 edited

Legend:

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

    r14153 r15332  
    5353    private NoteLayer noteLayer;
    5454
     55    /** This allows subclasses to ignore this warning */
     56    protected boolean warnAboutEmptyArea = true;
     57
    5558    /**
    5659     * Download a specific note by its id.
     
    125128        protected void finish() {
    126129            rememberDownloadedData(new NoteData(notesData));
    127             if (isCanceled() || isFailed() || notesData == null || notesData.isEmpty()) {
     130            if (isCanceled() || isFailed() || notesData == null) {
     131                return;
     132            }
     133            if (notesData.isEmpty()) {
     134                if (warnAboutEmptyArea) {
     135                    rememberErrorMessage(tr("No notes found in this area."));
     136                }
    128137                return;
    129138            }
Note: See TracChangeset for help on using the changeset viewer.