Changeset 3866 in josm for trunk/src/org
- Timestamp:
- 2011-02-07T14:50:48+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
r3479 r3866 85 85 } 86 86 87 // the string being inserted might be a "full" string from the list 88 // of valid completions (instanceof AutoCompletionListItem), or a 89 // "partial" string being typed (instanceof String). 90 Object item = comboBox.getSelectedItem(); 91 if (item != null && (item instanceof String || !curText.equals(((AutoCompletionListItem) item).getValue()))) { 92 // only in the latter case do we have to 87 93 // lookup and select a matching item 88 Objectitem = lookupItem(curText);94 item = lookupItem(curText); 89 95 setSelectedItem(item); 96 } 90 97 if (initial) { 91 98 start = 0; … … 114 121 } 115 122 116 private ObjectlookupItem(String pattern) {123 private AutoCompletionListItem lookupItem(String pattern) { 117 124 ComboBoxModel model = comboBox.getModel(); 118 125 AutoCompletionListItem bestItem = null;
Note:
See TracChangeset
for help on using the changeset viewer.