Changeset 20784 in osm for applications/editors/josm/plugins
- Timestamp:
- 2010-04-04T17:42:05+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/wayselector
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wayselector/build.xml
r20482 r20784 31 31 32 32 <!-- enter the SVN commit message --> 33 <property name="commit.message" value=" Initial release of the Way Selector plugin" />33 <property name="commit.message" value="Adjust to read-only JOSM selection object" /> 34 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 35 <property name="plugin.main.version" value="3095" /> -
applications/editors/josm/plugins/wayselector/src/org/openstreetmap/josm/plugins/wayselector/WaySelection.java
r20482 r20784 3 3 import java.util.ArrayList; 4 4 import java.util.Collection; 5 import java.util.LinkedList; 5 6 import java.util.List; 6 7 import java.util.TreeSet; … … 103 104 @param data the data set in which to extend the selection */ 104 105 void extend(DataSet data) { 105 Collection<OsmPrimitive> selection = data.getSelected(); 106 Collection<OsmPrimitive> currentSelection; 107 LinkedList<OsmPrimitive> selection; 106 108 boolean selectionChanged = false; 107 109 Way way; … … 110 112 return; 111 113 112 while ((way = findWay(selection)) != null) { 114 currentSelection = data.getSelected(); 115 116 way = findWay(currentSelection); 117 118 if (way == null) 119 return; 120 121 selection = new LinkedList<OsmPrimitive>(); 122 for (OsmPrimitive primitive : currentSelection) 123 selection.add(primitive); 124 125 do { 113 126 if (!selection.add(way)) 114 127 break; … … 117 130 ways.add(way); 118 131 addNodes(way); 119 } 132 133 way = findWay(selection); 134 } while (way != null); 120 135 121 136 if (selectionChanged)
Note:
See TracChangeset
for help on using the changeset viewer.