Changeset 2493 in josm for trunk/src


Ignore:
Timestamp:
2009-11-21T18:50:09+01:00 (12 years ago)
Author:
Gubaer
Message:

fixed #3991: "Add Properties" shortcut broken.

File:
1 edited

Legend:

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

    r2490 r2493  
    559559        JPanel buttonPanel = new JPanel(new GridLayout(1,3));
    560560
     561        // -- add action and shortcut
    561562        AddAction addAction = new AddAction();
    562         Shortcut.registerShortcut("properties:add", tr("Add Properties"), KeyEvent.VK_B,
    563                 Shortcut.GROUP_MNEMONIC);
    564563        this.btnAdd = new SideButton(addAction);
    565564        btnAdd.setFocusable(true);
     
    568567        btnAdd.getActionMap().put("onEnter", addAction);
    569568
     569        Shortcut sc = Shortcut.registerShortcut("properties:add", tr("Add Properties"), KeyEvent.VK_B,
     570                Shortcut.GROUP_MNEMONIC);
     571        Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), "properties:add");
     572        Main.contentPane.getActionMap().put("properties:add", addAction);
     573
     574
     575        // -- edit action
     576        //
    570577        EditAction editAction = new EditAction();
    571578        propertyTable.getSelectionModel().addListSelectionListener(editAction);
     
    575582
    576583        // -- delete action
     584        //
    577585        DeleteAction deleteAction = new DeleteAction();
    578586        this.btnDel = new SideButton(deleteAction);
Note: See TracChangeset for help on using the changeset viewer.