Changeset 21433 in osm
- Timestamp:
- 2010-05-24T17:52:53+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/remotecontrol/src/org/openstreetmap/josm/plugins/remotecontrol/RequestProcessor.java
r19946 r21433 196 196 } else if (item.startsWith("relation")) { 197 197 relations.add(Long.parseLong(item.substring(8))); 198 } else if (item.startsWith("rel")) { 199 relations.add(Long.parseLong(item.substring(3))); 198 200 } else { 199 201 System.out.println("RemoteControl: invalid selection '"+item+"' ignored"); 200 202 } 201 203 } 202 for (Way w : Main.main.getCurrentDataSet().getWays()) if (ways.contains(w.getId())) newSel.add(w); 203 for (Node n : Main.main.getCurrentDataSet().getNodes()) if (nodes.contains(n.getId())) newSel.add(n); 204 for (Relation r : Main.main.getCurrentDataSet().getRelations()) if (relations.contains(r.getId())) newSel.add(r); 205 Main.main.getCurrentDataSet().setSelected(newSel); 204 DataSet ds = Main.main.getCurrentDataSet(); 205 if(ds == null) // e.g. download failed 206 return; 207 for (Way w : ds.getWays()) if (ways.contains(w.getId())) newSel.add(w); 208 for (Node n : ds.getNodes()) if (nodes.contains(n.getId())) newSel.add(n); 209 for (Relation r : ds.getRelations()) if (relations.contains(r.getId())) newSel.add(r); 210 ds.setSelected(newSel); 206 211 if (Main.pref.getBoolean("remotecontrol.permission.change-viewport", true)) 207 212 new AutoScaleAction("selection").actionPerformed(null);
Note:
See TracChangeset
for help on using the changeset viewer.