Changeset 2264 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2009-10-10T14:14:28+02:00 (17 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 4 edited
-
UnGlueAction.java (modified) (1 diff)
-
mapmode/DrawAction.java (modified) (4 diffs)
-
search/SearchAction.java (modified) (3 diffs)
-
search/SearchCompiler.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r2256 r2264 152 152 Node c = new Node(selectedNode); 153 153 c.removeAll(); 154 c.setSelected(false);154 getCurrentDataSet().clearSelection(c); 155 155 cmds.add(new ChangeCommand(selectedNode, c)); 156 156 -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r2120 r2264 325 325 mousePos = e.getPoint(); 326 326 327 Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected(); 327 DataSet ds = getCurrentDataSet(); 328 Collection<OsmPrimitive> selection = ds.getSelected(); 328 329 Collection<Command> cmds = new LinkedList<Command>(); 329 330 … … 405 406 // here so /only/ the new way will be selected after this method finishes. 406 407 if(alt) { 407 wnew.setSelected(false);408 ds.addSelected(wnew); 408 409 } 409 410 … … 519 520 extendedWay = true; 520 521 getCurrentDataSet().setSelected(way); 521 DataSet.fireSelectionChanged( getCurrentDataSet().getSelected());522 DataSet.fireSelectionChanged(ds.getSelected()); 522 523 } 523 524 } … … 532 533 title = tr("Add node into way"); 533 534 for (Way w : reuseWays) { 534 w.setSelected(false);535 ds.clearSelection(w); 535 536 } 536 537 } -
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.
