Changeset 16631 in osm for applications/editors
- Timestamp:
- 2009-07-21T22:15:30+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/waydownloader
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/waydownloader/build.xml
r16590 r16631 91 91 <attribute name="Plugin-Description" value="Easy downloading along a long set of interconnected ways"/> 92 92 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WayDownloaderPlugin"/> 93 <attribute name="Plugin-Mainversion" value="181 3"/>93 <attribute name="Plugin-Mainversion" value="1815"/> 94 94 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 95 95 </manifest> -
applications/editors/josm/plugins/waydownloader/src/WayDownloaderPlugin.java
r16590 r16631 60 60 61 61 selectedNode = null; 62 Collection<OsmPrimitive> selection = Main. ds.getSelectedNodes();62 Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelectedNodes(); 63 63 64 64 if (selection.size()==0) { 65 selection = Main. ds.getSelectedWays();65 selection = Main.main.getCurrentDataSet().getSelectedWays(); 66 66 if (!workFromWaySelection(selection)) { 67 67 errMsg = tr("Select a starting node on the end of a way"); 68 68 } 69 selection = Main. ds.getSelectedNodes();69 selection = Main.main.getCurrentDataSet().getSelectedNodes(); 70 70 } 71 71 … … 138 138 LinkedList<Node> dupeNodes = new LinkedList<Node>(); 139 139 dupeNodes.add(dupeNode); 140 MergeNodesAction.mergeNodes(dupeNodes, selectedNode);140 new MergeNodesAction().mergeNodes(dupeNodes, selectedNode); 141 141 142 142 connectedWays = findConnectedWays(); //Carry on … … 166 166 167 167 //Select the next node 168 Main. ds.setSelected(nextNode);168 Main.main.getCurrentDataSet().setSelected(nextNode); 169 169 170 170 Main.map.mapView.zoomTo(nextNode.getEastNorth()); … … 177 177 /** See if there's another node at the same coordinates. If so return it. Otherwise null */ 178 178 private Node duplicateNode() { 179 for (Node onNode:Main. ds.nodes) {179 for (Node onNode:Main.main.getCurrentDataSet().nodes) { 180 180 if (!onNode.equals(this.selectedNode) 181 181 && onNode.getCoor().lat()==selectedNode.getCoor().lat() … … 199 199 200 200 //loop through every way 201 for (Way onWay:Main. ds.ways) {201 for (Way onWay:Main.main.getCurrentDataSet().ways) { 202 202 Object[] nodes = onWay.nodes.toArray(); 203 203 if (nodes.length<2) { … … 236 236 } 237 237 } 238 Main. ds.setSelected(selectedNode);238 Main.main.getCurrentDataSet().setSelected(selectedNode); 239 239 return true; 240 240 } 241 241 242 242 private boolean isDownloaded(Node node) { 243 for (DataSource datasource:Main. ds.dataSources) {243 for (DataSource datasource:Main.main.getCurrentDataSet().dataSources) { 244 244 Bounds bounds = datasource.bounds; 245 245
Note:
See TracChangeset
for help on using the changeset viewer.