Ignore:
Timestamp:
2018-08-31T00:57:57+02:00 (7 months ago)
Author:
Don-vip
Message:

fix #16698, see #15670 - make sure filters are executed (costly operation) only when necessary:

  • data changes imply execution of filters only when at least a filter is enabled
  • filter changes imply execution of filters even is no filter is enabled
  • filter dataset change events should not trigger a new filter execution!
File:
1 edited

Legend:

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

    r14138 r14206  
    3030import org.openstreetmap.josm.data.osm.FilterModel;
    3131import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent;
     32import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent.DatasetEventType;
    3233import org.openstreetmap.josm.data.osm.event.DataChangedEvent;
    3334import org.openstreetmap.josm.data.osm.event.DataSetListener;
     
    8384        DatasetEventManager.getInstance().addDatasetListener(this, FireMode.IN_EDT_CONSOLIDATED);
    8485        MapFrame.addMapModeChangeListener(this);
    85         filterModel.executeFilters();
     86        filterModel.executeFilters(true);
    8687    }
    8788
     
    326327    @Override
    327328    public void otherDatasetChange(AbstractDatasetChangedEvent event) {
    328         filterModel.executeFilters();
     329        if (!DatasetEventType.FILTERS_CHANGED.equals(event.getType())) {
     330            filterModel.executeFilters();
     331        }
    329332    }
    330333
Note: See TracChangeset for help on using the changeset viewer.