Changeset 7021 in josm for trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java
- Timestamp:
- 2014-04-29T01:18:18+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java
r7015 r7021 29 29 @Override 30 30 public void addElement(AutoCompletionListItem o) { 31 String newEntry = ((AutoCompletionListItem)o).getValue();31 String newEntry = o.getValue(); 32 32 33 33 // if history contains this object already, delete it, 34 34 // so that it looks like a move to the top 35 35 for (int i = 0; i < getSize(); i++) { 36 String oldEntry = ((AutoCompletionListItem) getElementAt(i)).getValue();36 String oldEntry = getElementAt(i).getValue(); 37 37 if(oldEntry.equals(newEntry)) { 38 38 removeElementAt(i); … … 75 75 public AutoCompletionListItem next() { 76 76 position++; 77 return (AutoCompletionListItem)getElementAt(position);77 return getElementAt(position); 78 78 } 79 79 };
Note:
See TracChangeset
for help on using the changeset viewer.