Changeset 4613 in josm for trunk/src/org


Ignore:
Timestamp:
2011-11-26T21:53:31+01:00 (12 years ago)
Author:
bastiK
Message:

see #6974 - fix problem caused by preference rework

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r4587 r4613  
    306306            String res = actionParser.saveAction(aDef);
    307307           
    308             Collection<String> t = new LinkedList<String>(Main.pref.getCollection("toolbar"));
    309             if (t!=null) {
    310                 // add custom search button to toolbar preferences
    311                 if (!t.contains(res)) t.add(res);
    312                 Main.pref.putCollection("toolbar", t);
    313                 Main.toolbar.refreshToolbarControl();
    314             }
     308            Collection<String> t = new LinkedList<String>(ToolbarPreferences.getToolString());
     309            // add custom search button to toolbar preferences
     310            if (!t.contains(res)) t.add(res);
     311            Main.pref.putCollection("toolbar", t);
     312            Main.toolbar.refreshToolbarControl();
    315313        }
    316314        return initialValues;
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r4586 r4613  
    876876    "tagginggroup_Man Made/Man Made"};
    877877
    878     private static Collection<String> getToolString() {
     878    public static Collection<String> getToolString() {
    879879
    880880        Collection<String> toolStr = Main.pref.getCollection("toolbar", Arrays.asList(deftoolbar));
Note: See TracChangeset for help on using the changeset viewer.