Changeset 13190 in josm
- Timestamp:
- 2017-12-03T18:09:08+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r13139 r13190 43 43 import javax.swing.Box; 44 44 import javax.swing.ButtonGroup; 45 import javax.swing.ComboBoxModel; 45 46 import javax.swing.DefaultListCellRenderer; 46 47 import javax.swing.ImageIcon; … … 637 638 Logging.trace("Focus gained by {0}, e={1}", values, e); 638 639 String key = keys.getEditor().getItem().toString(); 640 List<AutoCompletionItem> correctItems = autocomplete.getTagValues(getAutocompletionKeys(key), comparator); 641 ComboBoxModel<AutoCompletionItem> currentModel = values.getModel(); 642 final int size = correctItems.size(); 643 boolean valuesOK = size == currentModel.getSize(); 644 for (int i = 0; valuesOK && i < size; i++) { 645 valuesOK = Objects.equals(currentModel.getElementAt(i), correctItems.get(i)); 646 } 647 if (!valuesOK) { 648 values.setPossibleAcItems(correctItems); 649 } 639 650 if (!Objects.equals(key, objKey)) { 640 values.setPossibleAcItems(autocomplete.getTagValues(getAutocompletionKeys(key), comparator));641 651 values.getEditor().selectAll(); 642 652 objKey = key;
Note:
See TracChangeset
for help on using the changeset viewer.