Changeset 4374 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-08-28T13:58:57+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r4371 r4374 245 245 Collection<String> oldHistory = Main.pref.getCollection("file-open.history"); 246 246 List<String> history = new LinkedList<String>(oldHistory); 247 history.remove(filepath); 247 248 history.add(0, filepath); 248 249 Main.pref.putCollectionBounded("file-open.history", maxsize, history); -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r4371 r4374 745 745 */ 746 746 public boolean putCollectionBounded(String key, int maxsize, Collection<String> val) { 747 Collection<String> newCollection = new ArrayList<String>( maxsize);747 Collection<String> newCollection = new ArrayList<String>(Math.min(maxsize, val.size())); 748 748 for (String i : val) { 749 749 if (newCollection.size() >= maxsize) {
Note:
See TracChangeset
for help on using the changeset viewer.