Changeset 5382 in josm for trunk/src


Ignore:
Timestamp:
2012-07-30T15:21:06+02:00 (12 years ago)
Author:
Don-vip
Message:

Small code cleanup/refactorization in shortcut unregistration

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

Legend:

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

    r5357 r5382  
    442442    }
    443443
    444     public static void unregisterActionShortcut(Shortcut shortcut) {
     444    public static void unregisterShortcut(Shortcut shortcut) {
    445445        contentPanePrivate.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).remove(shortcut.getKeyStroke());
    446446    }
     
    451451
    452452    public static void unregisterActionShortcut(Action action, Shortcut shortcut) {
    453         contentPanePrivate.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).remove(shortcut.getKeyStroke());
     453        unregisterShortcut(shortcut);
    454454        contentPanePrivate.getActionMap().remove(action);
    455455    }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r5378 r5382  
    224224        Main.map.mapView.removeTemporaryLayer(this);
    225225        DataSet.removeSelectionListener(this);
    226         Main.unregisterActionShortcut(backspaceShortcut);
     226        Main.unregisterShortcut(backspaceShortcut);
    227227        snapHelper.unsetFixedMode();
    228228        snapCheckboxMenuItem.getAction().setEnabled(false);
     
    14111411
    14121412                if (active) {
    1413                     double de, dn, l, phi;
     1413                    double phi;
    14141414                    e0 = p0.east();
    14151415                    n0 = p0.north();
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r5266 r5382  
    736736                Main.registerActionShortcut(mode, mode.getShortcut());
    737737            } else {
    738                 Main.unregisterActionShortcut(mode.getShortcut());
     738                Main.unregisterShortcut(mode.getShortcut());
    739739            }
    740740        }
Note: See TracChangeset for help on using the changeset viewer.