Changeset 18732 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2023-05-17T23:01:34+02:00 (14 months ago)
Author:
taylor.smock
Message:

Fix #22908: Search button's dropdown list not initialized on JOSM launch (patch by gaben, modified)

File:
1 edited

Legend:

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

    r18173 r18732  
    7373
    7474    static {
     75        // Load the history on initial load (for the drop-down dialog)
     76        loadPrefs();
    7577        SearchCompiler.addMatchFactory(new SimpleMatchFactory() {
    7678            @Override
     
    186188     */
    187189    public static void search() {
    188         prefs.load("search.history");
     190        // Load the prefs, just in case someone fiddled with the preference value
     191        loadPrefs();
    189192        SearchSetting se = showSearchDialog(lastSearch);
    190193        if (se != null) {
    191194            searchWithHistory(se);
    192195        }
     196    }
     197
     198    /**
     199     * Load preference values into the model
     200     */
     201    private static void loadPrefs() {
     202        prefs.load("search.history");
    193203    }
    194204
Note: See TracChangeset for help on using the changeset viewer.