Changeset 15567 in josm


Ignore:
Timestamp:
2019-12-08T15:16:07+01:00 (2 years ago)
Author:
Don-vip
Message:

fix #18401 - Advanced options to disable autocomplete in add tags dialog (properties.autocomplete-keys / properties.autocomplete-values)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r15125 r15567  
    124124    public static final int MAX_LRU_TAGS_NUMBER = 30;
    125125
     126    /** Autocomplete keys by default */
     127    public static final BooleanProperty AUTOCOMPLETE_KEYS = new BooleanProperty("properties.autocomplete-keys", true);
     128    /** Autocomplete values by default */
     129    public static final BooleanProperty AUTOCOMPLETE_VALUES = new BooleanProperty("properties.autocomplete-values", true);
    126130    /** Use English language for tag by default */
    127131    public static final BooleanProperty PROPERTY_FIX_TAG_LOCALE = new BooleanProperty("properties.fix-tag-combobox-locale", false);
     
    715719            keys = new AutoCompletingComboBox();
    716720            values = new AutoCompletingComboBox();
     721            keys.setAutocompleteEnabled(AUTOCOMPLETE_KEYS.get());
     722            values.setAutocompleteEnabled(AUTOCOMPLETE_VALUES.get());
    717723
    718724            mainPanel.add(new JLabel("<html>"+trn("This will change up to {0} object.",
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java

    r15011 r15567  
    344344    }
    345345
    346     protected void setAutocompleteEnabled(boolean autocompleteEnabled) {
     346    /**
     347     * Sets whether the autocompletion is enabled
     348     * @param autocompleteEnabled {@code true} to enable autocompletion
     349     * @since 15567 (visibility)
     350     */
     351    public void setAutocompleteEnabled(boolean autocompleteEnabled) {
    347352        this.autocompleteEnabled = autocompleteEnabled;
    348353    }
Note: See TracChangeset for help on using the changeset viewer.