Changeset 3199 in josm


Ignore:
Timestamp:
2010-04-22T23:39:51+02:00 (15 years ago)
Author:
bastiK
Message:

see #4929 - filtered objects can be selected: fixed the first and the third issue from my reply (select something, then change the filter to include these objects; undo, such that the properties of a selected change and a filter applies)

File:
1 edited

Legend:

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

    r3178 r3199  
    3939        Collection<OsmPrimitive> seld = new LinkedList<OsmPrimitive> ();
    4040        Collection<OsmPrimitive> self = new LinkedList<OsmPrimitive> ();
    41         if(Main.main.getCurrentDataSet() == null)return;
    42         Main.main.getCurrentDataSet().setFiltered();
    43         Main.main.getCurrentDataSet().setDisabled();
     41        DataSet ds = Main.main.getCurrentDataSet();
     42        if(ds == null)return;
     43        ds.setFiltered();
     44        ds.setDisabled();
    4445        for (Filter flt : filters){
    4546            if(flt.enable){
     
    6061        disabledCount = seld.size() - self.size();
    6162        hiddenCount = self.size();
    62         Main.main.getCurrentDataSet().setFiltered(self);
    63         Main.main.getCurrentDataSet().setDisabled(seld);
     63        ds.setFiltered(self);
     64        ds.setDisabled(seld);
     65
     66        ds.clearSelection(seld);
     67
    6468        Main.map.mapView.repaint();
    6569    }
Note: See TracChangeset for help on using the changeset viewer.