Ignore:
Timestamp:
2014-01-06T21:46:07+01:00 (10 years ago)
Author:
simon04
Message:

fix #9514 fix #9484 fix #9502 - Upload dialog: make source field behave like comment field, provide link "obtain from current layers" to insert current layers in field, display Bing layer as "Bing"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r6631 r6654  
    590590    }
    591591
    592     public String getLastChangesetCommentFromHistory() {
    593         Collection<String> history = Main.pref.getCollection(BasicUploadSettingsPanel.HISTORY_KEY, new ArrayList<String>());
     592    private String getLastChangesetTagFromHistory(String historyKey) {
     593        Collection<String> history = Main.pref.getCollection(historyKey, new ArrayList<String>());
    594594        int age = (int) (System.currentTimeMillis() / 1000 - Main.pref.getInteger(BasicUploadSettingsPanel.HISTORY_LAST_USED_KEY, 0));
    595595        if (age < Main.pref.getInteger(BasicUploadSettingsPanel.HISTORY_MAX_AGE_KEY, 4 * 3600 * 1000) && history != null && !history.isEmpty()) {
     
    599599        }
    600600    }
     601
     602    public String getLastChangesetCommentFromHistory() {
     603        return getLastChangesetTagFromHistory(BasicUploadSettingsPanel.HISTORY_KEY);
     604    }
     605
     606    public String getLastChangesetSourceFromHistory() {
     607        return getLastChangesetTagFromHistory(BasicUploadSettingsPanel.SOURCE_HISTORY_KEY);
     608    }
    601609}
Note: See TracChangeset for help on using the changeset viewer.