Changeset 16963 in osm for applications
- Timestamp:
- 2009-08-10T13:05:59+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/waydownloader/src/WayDownloaderPlugin.java
r16962 r16963 177 177 /** See if there's another node at the same coordinates. If so return it. Otherwise null */ 178 178 private Node duplicateNode() { 179 179 for (Node onNode:Main.main.getCurrentDataSet().nodes) { 180 180 if (!onNode.equals(this.selectedNode) 181 181 && !onNode.incomplete 182 182 && onNode.getCoor().lat()==selectedNode.getCoor().lat() 183 183 && onNode.getCoor().lon()==selectedNode.getCoor().lon()) { … … 217 217 private boolean workFromWaySelection(Collection<OsmPrimitive> selection) { 218 218 219 if (selection.size()>1) { 220 //more than one way selected 219 if (selection.size() != 1) 221 220 return false; 222 } else { 223 Way selectedWay = (Way) selection.toArray()[0]; 224 selectedNode = selectedWay.firstNode(); 225 226 if (isDownloaded(selectedNode)) { 227 selectedNode = findOtherEnd(selectedWay, selectedNode); 228 229 if (isDownloaded(selectedNode)) return false; 230 } 221 Way selectedWay = (Way) selection.iterator().next(); 222 selectedNode = selectedWay.firstNode(); 223 224 if (isDownloaded(selectedNode)) { 225 selectedNode = selectedWay.lastNode(); 226 227 if (isDownloaded(selectedNode)) return false; 231 228 } 232 229 Main.main.getCurrentDataSet().setSelected(selectedNode);
Note:
See TracChangeset
for help on using the changeset viewer.