Changeset 5843 in josm for trunk


Ignore:
Timestamp:
2013-04-13T10:46:50+02:00 (7 years ago)
Author:
akks
Message:

fix #8508: correct pasting of tags copied from properties table by Ctrl-C

File:
1 edited

Legend:

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

    r5825 r5843  
    1010import java.awt.Point;
    1111import java.awt.event.ActionEvent;
     12import java.awt.event.InputEvent;
    1213import java.awt.event.KeyEvent;
    1314import java.awt.event.MouseAdapter;
     
    466467        // unassign some standard shortcuts for JTable to allow upload / download
    467468        InputMapUtils.unassignCtrlShiftUpDown(propertyTable, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
     469       
     470        // unassign some standard shortcuts for correct copy-pasting, fix #8508
     471        propertyTable.setTransferHandler(null);
     472 
     473        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
     474                .put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK),"onCopy");
     475        propertyTable.getActionMap().put("onCopy",copyKeyValueAction);
     476
    468477        // allow using enter to add tags for all look&feel configurations
    469478        InputMapUtils.enableEnter(this.btnAdd);
Note: See TracChangeset for help on using the changeset viewer.