Ignore:
Timestamp:
2009-02-11T10:24:01+01:00 (15 years ago)
Author:
stoecker
Message:

fix #2156

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r1349 r1393  
    145145                Icon i;
    146146                if (value != null) {
    147                     Action action = actions.get(value);
     147                    Action action = getAction((String)value);
    148148                    s = (String) action.getValue(Action.NAME);
    149149                    i = (Icon) action.getValue(Action.SMALL_ICON);
     
    349349            if (s.equals("|"))
    350350                selected.addElement(null);
    351             else {
    352                 if (actions.get(s) != null) {
    353                     selected.addElement(s);
    354                 }
    355             }
     351            else if (getAction(s) != null)
     352                selected.addElement(s);
    356353        }
    357354    }
     
    379376            loadAction(newNode, item);
    380377        }
     378    }
     379
     380    public Action getAction(String s)
     381    {
     382        Action e = actions.get(s);
     383        if(e == null)
     384            e = regactions.get(s);
     385        return e;
    381386    }
    382387
     
    421426                t.add("|");
    422427            else
    423                 t.add((String)((actions.get(selected.get(i))).getValue("toolbar")));
     428                t.add((String)((getAction((String)selected.get(i))).getValue("toolbar")));
    424429        }
    425430        Main.pref.putCollection("toolbar", t);
     
    449454                control.addSeparator();
    450455            else
    451                 control.add(actions.get(s));
     456                control.add(getAction(s));
    452457        }
    453458        control.setVisible(control.getComponentCount() != 0);
Note: See TracChangeset for help on using the changeset viewer.