Changeset 4979 in josm for trunk/src/org


Ignore:
Timestamp:
2012-02-18T09:28:21+01:00 (8 years ago)
Author:
stoecker
Message:

fix #7410 - infinite loop

File:
1 edited

Legend:

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

    r4975 r4979  
    305305    @Deprecated public static final int SHIFT_DEFAULT = 1;
    306306    @Deprecated public static Shortcut registerShortcut(String shortText, String longText, int requestedKey, int requestedGroup, int modifier) {
    307         return registerShortcut(shortText, longText, requestedKey, requestedGroup, modifier);
     307        return registerShortcut(shortText, longText, requestedKey, requestedGroup, new Integer(modifier));
    308308    }
    309309
     
    407407    }
    408408
     409/*  NEW function:
     410    private static int findModifier(int group, Integer modifier) {
     411        if(modifier == null) {
     412            modifier = getGroupModifier(group);
     413            if (modifier == null) { // garbage in, no shortcut out
     414                modifier = getGroupModifier(NONE);
     415            }
     416        }
     417        return modifier;
     418    }*/
     419
    409420    // shutdown handling
    410421    public static boolean savePrefs() {
     
    451462     */
    452463    public static Shortcut registerShortcut(String shortText, String longText, int requestedKey, int requestedGroup) {
    453         return registerShortcut(shortText, longText, requestedKey, requestedGroup);
     464        return registerShortcut(shortText, longText, requestedKey, requestedGroup, null);
    454465    }
    455466
Note: See TracChangeset for help on using the changeset viewer.