Changeset 583 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2008-03-16T01:21:49+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
r564 r583 19 19 import org.openstreetmap.josm.data.osm.Node; 20 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 import org.openstreetmap.josm.data.osm.Way; 21 22 22 23 /** … … 34 35 Collection<OsmPrimitive> sel = Main.ds.getSelected(); 35 36 Collection<Node> nodes = new LinkedList<Node>(); 37 36 38 for (OsmPrimitive osm : sel) 37 39 if (osm instanceof Node) 38 40 nodes.add((Node)osm); 41 42 // special case if no single nodes are selected and exactly one way is: 43 // then use the way's nodes 44 if ((nodes.size() == 0) && (sel.size() == 1)) 45 for (OsmPrimitive osm : sel) 46 if (osm instanceof Way) 47 nodes.addAll(((Way)osm).nodes); 48 39 49 if (nodes.size() < 4) { 40 50 JOptionPane.showMessageDialog(Main.parent, tr("Please select at least four nodes."));
Note:
See TracChangeset
for help on using the changeset viewer.