Changeset 8196 in josm for trunk/src


Ignore:
Timestamp:
2015-04-15T20:53:45+02:00 (10 years ago)
Author:
simon04
Message:

Search Notes: consider numeric value as note id to load

File:
1 edited

Legend:

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

    r8071 r8196  
    7373        Main.pref.putCollection(HISTORY_KEY, searchTermBox.getHistory());
    7474
     75        performSearch(searchTerm);
     76
     77    }
     78
     79    public void performSearch(String searchTerm) {
     80
    7581        searchTerm = searchTerm.trim();
     82
     83        try {
     84            final long id = Long.parseLong(searchTerm);
     85            new DownloadNotesTask().download(false, id, null);
     86            return;
     87        } catch (NumberFormatException ignore) {
     88        }
     89
    7690        int noteLimit = Main.pref.getInteger("osm.notes.downloadLimit", 1000);
    7791        int closedLimit = Main.pref.getInteger("osm.notes.daysCloased", 7);
Note: See TracChangeset for help on using the changeset viewer.