Changeset 4132 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2011-06-10T08:07:58+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
r4018 r4132 70 70 String curText = getText(0, size); 71 71 72 // if the text starts with a number we don't autocomplete 72 // item for lookup and selection 73 Object item = null; 74 // if the text is a number we don't autocomplete 73 75 if (Main.pref.getBoolean("autocomplete.dont_complete_numbers", true)) { 74 76 try { 75 77 Long.parseLong(str); 76 if (curText.length() == 0) 77 // we don't autocomplete on numbers 78 return; 79 Long.parseLong(curText); 80 return; 78 if (curText.length() != 0) 79 Long.parseLong(curText); 81 80 } catch (NumberFormatException e) { 82 81 // either the new text or the current text isn't a number. We continue with 83 82 // autocompletion 84 } 85 } 86 87 // lookup and select a matching item 88 Object item = lookupItem(curText); 83 item = lookupItem(curText); 84 } 85 } else { 86 item = lookupItem(curText); 87 } 88 89 89 setSelectedItem(item); 90 90 if (initial) {
Note:
See TracChangeset
for help on using the changeset viewer.