Changeset 1814 in josm for trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
- Timestamp:
- 2009-07-19T19:04:49+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
r1640 r1814 31 31 public AlignInLineAction() { 32 32 super(tr("Align Nodes in Line"), "alignline", tr("Move the selected nodes in to a line."), 33 Shortcut.registerShortcut("tools:alignline", tr("Tool: {0}", tr("Align Nodes in Line")), KeyEvent.VK_L, Shortcut.GROUP_EDIT), true);33 Shortcut.registerShortcut("tools:alignline", tr("Tool: {0}", tr("Align Nodes in Line")), KeyEvent.VK_L, Shortcut.GROUP_EDIT), true); 34 34 } 35 35 … … 40 40 */ 41 41 public void actionPerformed(ActionEvent e) { 42 Collection<OsmPrimitive> sel = Main.ds.getSelected();42 Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected(); 43 43 Collection<Node> nodes = new LinkedList<Node>(); 44 44 Collection<Node> itnodes = new LinkedList<Node>(); … … 50 50 // special case if no single nodes are selected and exactly one way is: 51 51 // then use the way's nodes 52 if ((nodes.size() == 0) && (sel.size() == 1)) 52 if ((nodes.size() == 0) && (sel.size() == 1)) { 53 53 for (OsmPrimitive osm : sel) 54 54 if (osm instanceof Way) { … … 56 56 itnodes.addAll(((Way)osm).nodes); 57 57 } 58 } 58 59 if (nodes.size() < 3) { 59 60 JOptionPane.showMessageDialog(Main.parent, tr("Please select at least three nodes."));
Note:
See TracChangeset
for help on using the changeset viewer.