Changeset 9525 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2016-01-18T13:19:52+01:00 (9 years ago)
Author:
bastiK
Message:

applied #12395 - fix displaying shortcut key of help action in properties dialog (patch by kolesar)

File:
1 edited

Legend:

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

    r9171 r9525  
    529529        // F1 button = custom help action
    530530        getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
    531                 KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), "onHelp");
     531                helpAction.getKeyStroke(), "onHelp");
    532532        getActionMap().put("onHelp", helpAction);
    533533    }
     
    11231123    class HelpAction extends AbstractAction {
    11241124        HelpAction() {
    1125             putValue(NAME, tr("Go to OSM wiki for tag help (F1)"));
     1125            putValue(NAME, tr("Go to OSM wiki for tag help"));
    11261126            putValue(SHORT_DESCRIPTION, tr("Launch browser with wiki help for selected object"));
    11271127            putValue(SMALL_ICON, ImageProvider.get("dialogs", "search"));
     1128            putValue(ACCELERATOR_KEY, getKeyStroke());
     1129        }
     1130
     1131        public KeyStroke getKeyStroke() {
     1132            return KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0);
    11281133        }
    11291134
Note: See TracChangeset for help on using the changeset viewer.