- Timestamp:
- 2008-08-06T15:41:33+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
r748 r749 23 23 /** 24 24 * Aligns all selected nodes within a circle. (Useful for roundabouts) 25 * 25 * 26 26 * @author Matthew Newton 27 27 */ … … 35 35 Collection<OsmPrimitive> sel = Main.ds.getSelected(); 36 36 Collection<Node> nodes = new LinkedList<Node>(); 37 37 38 38 for (OsmPrimitive osm : sel) 39 39 if (osm instanceof Node) 40 40 nodes.add((Node)osm); 41 41 42 42 // special case if no single nodes are selected and exactly one way is: 43 43 // then use the way's nodes … … 45 45 for (OsmPrimitive osm : sel) 46 46 if (osm instanceof Way) 47 nodes.addAll(((Way)osm).nodes); 48 47 for (Node n : ((Way)osm).nodes) 48 { 49 if(!nodes.contains(n)) 50 nodes.add(n); 51 } 52 49 53 if (nodes.size() < 4) { 50 54 JOptionPane.showMessageDialog(Main.parent, tr("Please select at least four nodes."));
Note:
See TracChangeset
for help on using the changeset viewer.