Ticket #8921: possible_fix.patch

File possible_fix.patch, 1.3 KB (added by akks, 13 years ago)
  • src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

     
    5252import javax.swing.JPanel;
    5353import javax.swing.JPopupMenu;
    5454import javax.swing.KeyStroke;
     55import javax.swing.SwingUtilities;
    5556import javax.swing.table.DefaultTableModel;
    5657import javax.swing.text.JTextComponent;
    5758
     
    693694                            // add tags and close window on double-click
    694695                            if (e.getClickCount()>1) {
    695696                                performTagAdding();
    696                                 buttonAction(0, null); // emulate OK click and close the dialog
     697                                SwingUtilities.invokeLater(new Runnable() {
     698                                    @Override public void run() {
     699                                        buttonAction(0, null); // emulate OK click and close the dialog
     700                                    }
     701                                });
    697702                            }
    698703                            // add tags on Shift-Click
    699704                            if (e.isShiftDown()) {