Changeset 2264 in josm for trunk/src/org/openstreetmap/josm/actions/search
- Timestamp:
- 2009-10-10T14:14:28+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions/search
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r2262 r2264 26 26 import org.openstreetmap.josm.tools.Shortcut; 27 27 import org.openstreetmap.josm.data.osm.Filter; 28 import org.openstreetmap.josm.data.osm.DataSet; 28 29 29 30 public class SearchAction extends JosmAction{ … … 89 90 left.add(input, GBC.eop().fill(GBC.HORIZONTAL)); 90 91 left.add(replace, GBC.eol()); 92 DataSet ds = Main.main.getCurrentDataSet(); 91 93 left.add(add, GBC.eol()); 92 94 left.add(remove, GBC.eol()); … … 237 239 // } 238 240 239 Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected(); 241 final DataSet ds = Main.main.getCurrentDataSet(); 242 Collection<OsmPrimitive> sel = ds.getSelected(); 240 243 int foundMatches = getSelection(s, sel, new Function(){ 241 244 public Boolean isSomething(OsmPrimitive o){ 242 return o.isSelected();245 return ds.isSelected(o); 243 246 } 244 247 }); 245 Main.main.getCurrentDataSet().setSelected(sel);248 ds.setSelected(sel); 246 249 if (foundMatches == 0) { 247 250 String msg = null; -
trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
r2166 r2264 424 424 private static class Selected extends Match { 425 425 @Override public boolean match(OsmPrimitive osm) { 426 return osm.isSelected();426 return Main.main.getCurrentDataSet().isSelected(osm); 427 427 } 428 428 @Override public String toString() {return "selected";}
Note:
See TracChangeset
for help on using the changeset viewer.