Changeset 6744 in josm for trunk/src/org
- Timestamp:
- 2014-01-19T22:11:57+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r6742 r6744 20 20 import java.util.Collections; 21 21 import java.util.HashSet; 22 import java.util.LinkedHashSet; 22 23 import java.util.LinkedList; 23 24 import java.util.List; … … 100 101 if(searchHistory.isEmpty() || !s.equals(searchHistory.getFirst())) { 101 102 searchHistory.addFirst(new SearchSetting(s)); 103 } else if (searchHistory.contains(s)) { 104 // move existing entry to front, fixes #8032 - search history loses entries when re-using queries 105 searchHistory.remove(s); 106 searchHistory.addFirst(new SearchSetting(s)); 102 107 } 103 108 int maxsize = Main.pref.getInteger("search.history-size", DEFAULT_SEARCH_HISTORY_SIZE); … … 105 110 searchHistory.removeLast(); 106 111 } 107 Li st<String> savedHistory = new ArrayList<String>(searchHistory.size());112 LinkedHashSet<String> savedHistory = new LinkedHashSet<String>(searchHistory.size()); 108 113 for (SearchSetting item: searchHistory) { 109 114 savedHistory.add(item.writeToString());
Note:
See TracChangeset
for help on using the changeset viewer.