Ignore:
Timestamp:
2015-09-02T23:11:47+02:00 (9 years ago)
Author:
simon04
Message:

fix #11583 - Add mnemonic key to "Search menu items": ALT+R

R … think of Run command :)

File:
1 edited

Legend:

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

    r8510 r8720  
    1717import javax.swing.JMenu;
    1818import javax.swing.KeyStroke;
     19import javax.swing.text.JTextComponent;
    1920
    2021import org.openstreetmap.josm.Main;
     
    215216    }
    216217    /**
     218     * Sets the mnemonic key on a text component.
     219     */
     220    public void setFocusAccelerator(JTextComponent component) {
     221        if (assignedModifier == getGroupModifier(MNEMONIC)  && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) {
     222            component.setFocusAccelerator(KeyEvent.getKeyText(assignedKey).charAt(0));
     223        }
     224    }
     225    /**
    217226     * use this to set a actions's accelerator
    218227     */
Note: See TracChangeset for help on using the changeset viewer.