Ignore:
Timestamp:
2009-07-19T19:04:49+02:00 (15 years ago)
Author:
Gubaer
Message:

removed dependencies to Main.ds, removed Main.ds
removed AddVisitor, NameVisitor, DeleteVisitor - unnecessary double dispatching for these simple cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java

    r1640 r1814  
    3131    public AlignInLineAction() {
    3232        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);
    3434    }
    3535
     
    4040     */
    4141    public void actionPerformed(ActionEvent e) {
    42         Collection<OsmPrimitive> sel = Main.ds.getSelected();
     42        Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
    4343        Collection<Node> nodes = new LinkedList<Node>();
    4444        Collection<Node> itnodes = new LinkedList<Node>();
     
    5050        // special case if no single nodes are selected and exactly one way is:
    5151        // then use the way's nodes
    52         if ((nodes.size() == 0) && (sel.size() == 1))
     52        if ((nodes.size() == 0) && (sel.size() == 1)) {
    5353            for (OsmPrimitive osm : sel)
    5454                if (osm instanceof Way) {
     
    5656                    itnodes.addAll(((Way)osm).nodes);
    5757                }
     58        }
    5859        if (nodes.size() < 3) {
    5960            JOptionPane.showMessageDialog(Main.parent, tr("Please select at least three nodes."));
Note: See TracChangeset for help on using the changeset viewer.