Changeset 18128 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2021-08-07T00:40:05+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java
r18126 r18128 6 6 import javax.swing.text.JTextComponent; 7 7 8 import org.openstreetmap.josm.data.tagging.ac.AutoCompletionItem;9 8 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox; 10 9 import org.openstreetmap.josm.spi.preferences.Config; … … 56 55 */ 57 56 public void addCurrentItemToHistory() { 58 Object item = getEditor().getItem(); 59 if (item instanceof String) { 60 model.addElement((String) item); 61 } else if (item instanceof AutoCompletionItem) { 62 model.addElement((AutoCompletionItem) item); 63 } else { 64 throw new IllegalArgumentException(item.getClass().getSimpleName() + " is not supported in addCurrentItemToHistory"); 65 } 57 model.addElement(getEditor().getItem().toString()); 66 58 } 67 59
Note:
See TracChangeset
for help on using the changeset viewer.