Changeset 3252 in josm for trunk/src/org/openstreetmap/josm/actions/JosmAction.java
- Timestamp:
- 2010-05-15T18:59:10+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r3244 r3252 7 7 8 8 import javax.swing.AbstractAction; 9 import javax.swing.JComponent;10 9 11 10 import org.openstreetmap.josm.Main; … … 72 71 sc = shortcut; 73 72 if (sc != null) { 74 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), name); 75 Main.contentPane.getActionMap().put(name, this); 73 Main.registerActionShortcut(this, sc); 76 74 } 77 75 putValue(SHORT_DESCRIPTION, Main.platform.makeTooltip(tooltip, sc)); … … 90 88 public void destroy() { 91 89 if (sc != null) { 92 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).remove(sc.getKeyStroke()); 93 Main.contentPane.getActionMap().remove(sc.getKeyStroke()); 90 Main.unregisterActionShortcut(sc); 94 91 } 95 92 MapView.removeLayerChangeListener(layerChangeAdapter);
Note:
See TracChangeset
for help on using the changeset viewer.