Ignore:
Timestamp:
2007-10-23T22:51:47+02:00 (17 years ago)
Author:
gebner
Message:

PropertiesDialog: Remember value when editing keys.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/AutoCompleteComboBox.java

    r298 r415  
    8282
    8383        public void setPossibleItems(Collection<String> elems) {
    84                 Object oldValue = this.getSelectedItem();
    8584                DefaultComboBoxModel model = (DefaultComboBoxModel)this.getModel();
     85                Object oldValue = this.getEditor().getItem();
    8686                model.removeAllElements();
    8787                for (String elem : elems) model.addElement(elem);
    88                 this.setSelectedItem(oldValue);
     88                this.getEditor().setItem(oldValue);
    8989                this.getEditor().selectAll();
    9090        }
Note: See TracChangeset for help on using the changeset viewer.