Changeset 415 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2007-10-23T22:51:47+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AutoCompleteComboBox.java
r298 r415 82 82 83 83 public void setPossibleItems(Collection<String> elems) { 84 Object oldValue = this.getSelectedItem();85 84 DefaultComboBoxModel model = (DefaultComboBoxModel)this.getModel(); 85 Object oldValue = this.getEditor().getItem(); 86 86 model.removeAllElements(); 87 87 for (String elem : elems) model.addElement(elem); 88 this. setSelectedItem(oldValue);88 this.getEditor().setItem(oldValue); 89 89 this.getEditor().selectAll(); 90 90 }
Note:
See TracChangeset
for help on using the changeset viewer.