Changeset 5483 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2012-08-30T21:40:23+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
r5479 r5483 222 222 public void setPossibleItems(Collection<String> elems) { 223 223 DefaultComboBoxModel model = (DefaultComboBoxModel)this.getModel(); 224 Object oldValue = getSelectedItem();224 Object oldValue = this.getEditor().getItem(); // Do not use getSelectedItem(); (fix #8013) 225 225 model.removeAllElements(); 226 226 for (String elem : elems) { … … 230 230 // AutoCompletingComboBoxDocument#insertString 231 231 autocompleteEnabled = false; 232 setSelectedItem(oldValue);232 this.getEditor().setItem(oldValue); // Do not use setSelectedItem(oldValue); (fix #8013) 233 233 autocompleteEnabled = true; 234 234 } … … 240 240 DefaultComboBoxModel model = (DefaultComboBoxModel)this.getModel(); 241 241 Object oldValue = getSelectedItem(); 242 Object editorOldValue = this.getEditor().getItem(); 242 243 model.removeAllElements(); 243 244 for (AutoCompletionListItem elem : elems) { … … 245 246 } 246 247 setSelectedItem(oldValue); 248 this.getEditor().setItem(editorOldValue); 247 249 } 248 250
Note:
See TracChangeset
for help on using the changeset viewer.