Changeset 8952 in josm for trunk/src/org


Ignore:
Timestamp:
2015-10-27T14:03:41+01:00 (4 years ago)
Author:
Don-vip
Message:

see #12012 - add log message for shortcut reassignments

File:
1 edited

Legend:

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

    r8928 r8952  
    434434    private static Shortcut registerShortcut(String shortText, String longText, int requestedKey, int requestedGroup, Integer modifier) {
    435435        doInit();
    436         Integer defaultModifier = findModifier(requestedGroup, modifier);
    437436        if (shortcuts.containsKey(shortText)) { // a re-register? maybe a sc already read from the preferences?
    438437            Shortcut sc = shortcuts.get(shortText);
     
    441440            return sc;
    442441        }
     442        Integer defaultModifier = findModifier(requestedGroup, modifier);
    443443        Shortcut conflict = findShortcut(requestedKey, defaultModifier);
    444444        if (conflict != null) {
     
    447447                int newmodifier = findNewOsxModifier(requestedGroup);
    448448                if (findShortcut(requestedKey, newmodifier) == null) {
     449                    Main.info("Reassigning OSX shortcut '" + shortText + "' from Meta to Ctrl because of conflict with " + conflict);
    449450                    return reassignShortcut(shortText, longText, requestedKey, conflict, requestedGroup, requestedKey, newmodifier);
    450451                }
     
    454455                    int newmodifier = getGroupModifier(m);
    455456                    if (findShortcut(k, newmodifier) == null) {
     457                        Main.info("Reassigning shortcut '" + shortText + "' from " + modifier + " to " + newmodifier +
     458                                " because of conflict with " + conflict);
    456459                        return reassignShortcut(shortText, longText, requestedKey, conflict, m, k, newmodifier);
    457460                    }
Note: See TracChangeset for help on using the changeset viewer.