Changeset 8217 in josm


Ignore:
Timestamp:
2015-04-18T11:55:57+02:00 (9 years ago)
Author:
simon04
Message:

fix #10867 - Notes download: inform user about reaching download limit (2/2)

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

Legend:

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

    r8216 r8217  
    145145                notesData = reader.parseNotes(null, null, subMonitor);
    146146            } catch (BoundingBoxDownloader.MoreNotesException e) {
     147                notesData = e.notes;
    147148                JOptionPane.showMessageDialog(Main.parent, "<html>"
    148149                                + trn("{0} note has been downloaded.", "{0} notes have been downloaded.", e.limit, e.limit)
  • trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java

    r8216 r8217  
    182182            final List<Note> notes = reader.parse();
    183183            if (notes.size() == noteLimit) {
    184                 throw new MoreNotesException(noteLimit);
     184                throw new MoreNotesException(notes, noteLimit);
    185185            }
    186186            return notes;
     
    199199    public static class MoreNotesException extends RuntimeException{
    200200        /**
     201         * The downloaded notes
     202         */
     203        public final List<Note> notes;
     204        /**
    201205         * The download limit sent to the server.
    202206         */
    203207        public final int limit;
    204208
    205         public MoreNotesException(int limit) {
     209        public MoreNotesException(List<Note> notes, int limit) {
     210            this.notes = notes;
    206211            this.limit = limit;
    207212        }
Note: See TracChangeset for help on using the changeset viewer.