Changeset 12346 in josm for trunk


Ignore:
Timestamp:
2017-06-08T23:11:17+02:00 (7 years ago)
Author:
michael2402
Message:

SearchAction: Use ExpertToggleAction to determine if expert mode is active.

File:
1 edited

Legend:

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

    r12345 r12346  
    4242import org.openstreetmap.josm.actions.ActionParameter;
    4343import org.openstreetmap.josm.actions.ActionParameter.SearchSettingsActionParameter;
     44import org.openstreetmap.josm.actions.ExpertToggleAction;
    4445import org.openstreetmap.josm.actions.JosmAction;
    4546import org.openstreetmap.josm.actions.ParameterizedAction;
     
    299300        additionalSettings.add(caseSensitive, GBC.eol().anchor(GBC.WEST).fill(GBC.HORIZONTAL));
    300301
    301         if (Main.pref.getBoolean("expert", false)) {
     302        left.add(selectionSettings, GBC.eol().fill(GBC.BOTH));
     303        left.add(additionalSettings, GBC.eol().fill(GBC.BOTH));
     304
     305        if (ExpertToggleAction.isExpert()) {
    302306            additionalSettings.add(allElements, GBC.eol());
    303307            additionalSettings.add(addOnToolbar, GBC.eop());
     
    309313            searchOptions.add(mapCSSSearch, GBC.eol());
    310314
    311             left.add(selectionSettings, GBC.eol().fill(GBC.BOTH));
    312             left.add(additionalSettings, GBC.eol().fill(GBC.BOTH));
    313315            left.add(searchOptions, GBC.eol().fill(GBC.BOTH));
    314         } else {
    315             left.add(selectionSettings, GBC.eol().fill(GBC.BOTH));
    316             left.add(additionalSettings, GBC.eol().fill(GBC.BOTH));
    317316        }
    318317
     
    450449                GBC.eol());
    451450
    452         if (Main.pref.getBoolean("expert", false)) {
     451        if (ExpertToggleAction.isExpert()) {
    453452            hintPanel.add(new SearchKeywordRow(hcbSearchString)
    454453                .addTitle(tr("objects"))
Note: See TracChangeset for help on using the changeset viewer.