Changeset 15477 in josm for trunk/src/org


Ignore:
Timestamp:
2019-10-27T12:58:42+01:00 (5 years ago)
Author:
Don-vip
Message:

preserve filter attributes when editing an existing filter with non-default attributes

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Filter.java

    r15226 r15477  
    5454    public Filter(SearchSetting setting) {
    5555        super(setting);
     56    }
     57
     58    /**
     59     * Constructs a new {@code Filter} from a {@code SearchSetting} and filter-specific fields from an existing Filter.
     60     * @param setting {@code SearchSetting} to construct information from
     61     * @param f {@code Filter} to construct filter-specific fields from
     62     * @since 15477
     63     */
     64    public Filter(SearchSetting setting, Filter f) {
     65        super(setting);
     66        this.enable = f.enable;
     67        this.hiding = f.hiding;
     68        this.inverted = f.inverted;
    5669    }
    5770
  • trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java

    r15226 r15477  
    164164            SearchSetting searchSetting = SearchAction.showSearchDialog(f);
    165165            if (searchSetting != null) {
    166                 filterModel.setValue(index, new Filter(searchSetting));
     166                filterModel.setValue(index, new Filter(searchSetting, f));
    167167            }
    168168        }
Note: See TracChangeset for help on using the changeset viewer.