Changeset 16502 in josm


Ignore:
Timestamp:
2020-05-27T07:31:26+02:00 (5 years ago)
Author:
simon04
Message:

fix #19295 - Ctrl+H doesn't work when getting started screen is focused

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java

    r16138 r16502  
    2727public class HistoryInfoAction extends JosmAction {
    2828
     29    /** Action shortcut, made public in order to be used from {@code GettingStarted} page. */
     30    public static final Shortcut SHORTCUT = Shortcut.registerShortcut("core:historyinfo", tr("History"), KeyEvent.VK_H, Shortcut.CTRL);
     31
    2932    /**
    3033     * Constructs a new {@code HistoryInfoAction}.
     
    3336        super(tr("History"), "dialogs/history",
    3437                tr("Display history information about OSM ways, nodes, or relations."),
    35                 Shortcut.registerShortcut("core:historyinfo",
    36                         tr("History"), KeyEvent.VK_H, Shortcut.CTRL), false);
     38                SHORTCUT, false);
    3739        setHelpId(ht("/Action/ObjectHistory"));
    3840        setToolbarId("action/historyinfo");
  • trunk/src/org/openstreetmap/josm/gui/GettingStarted.java

    r16426 r16502  
    2222
    2323import org.openstreetmap.josm.actions.DownloadPrimitiveAction;
     24import org.openstreetmap.josm.actions.HistoryInfoAction;
    2425import org.openstreetmap.josm.data.Version;
    2526import org.openstreetmap.josm.gui.animation.AnimationExtensionManager;
     
    135136        lg = new LinkGeneral("<html>" + STYLE + "<h1>" + "JOSM - " + tr("Java OpenStreetMap Editor")
    136137                + "</h1><h2 align=\"center\">" + tr("Downloading \"Message of the day\"") + "</h2></html>");
    137         // clear the build-in command ctrl+shift+O, ctrl+space because it is used as shortcut in JOSM
     138        // clear the build-in command ctrl+shift+O, ctrl+space, ctrl+H because it is used as shortcut in JOSM
    138139        lg.getInputMap(JComponent.WHEN_FOCUSED).put(DownloadPrimitiveAction.SHORTCUT.getKeyStroke(), "none");
    139140        lg.getInputMap(JComponent.WHEN_FOCUSED).put(MenuItemSearchDialog.Action.SHORTCUT.getKeyStroke(), "none");
     141        lg.getInputMap(JComponent.WHEN_FOCUSED).put(HistoryInfoAction.SHORTCUT.getKeyStroke(), "none");
    140142        lg.setTransferHandler(null);
    141143
Note: See TracChangeset for help on using the changeset viewer.