Changeset 416 in josm


Ignore:
Timestamp:
2007-10-24T17:58:17+02:00 (17 years ago)
Author:
gebner
Message:

Don't perform property edit when clicking on cancel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java

    r415 r416  
    1515import java.awt.event.FocusAdapter;
    1616import java.awt.event.FocusEvent;
     17import java.awt.event.KeyAdapter;
    1718import java.awt.event.KeyEvent;
    1819import java.awt.event.MouseAdapter;
     
    149150                };
    150151                final JDialog dlg = optionPane.createDialog(Main.parent, tr("Change values?"));
    151                 valueField.addActionListener(new ActionListener(){
     152
     153                valueField.getEditor().addActionListener(new ActionListener() {
    152154                        public void actionPerformed(ActionEvent e) {
     155                                dlg.setVisible(false);
    153156                                optionPane.setValue(JOptionPane.OK_OPTION);
    154                                 dlg.setVisible(false);
    155157                        }
    156158                });
     159
    157160                String oldValue = valueField.getEditor().getItem().toString();
    158161                dlg.setVisible(true);
Note: See TracChangeset for help on using the changeset viewer.