Ignore:
Timestamp:
2018-08-18T03:38:20+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java

    r34380 r34499  
    1111import javax.swing.JOptionPane;
    1212
    13 import org.openstreetmap.josm.Main;
    1413import org.openstreetmap.josm.actions.JosmAction;
    1514import org.openstreetmap.josm.command.AddCommand;
    1615import org.openstreetmap.josm.command.Command;
    1716import org.openstreetmap.josm.command.SequenceCommand;
     17import org.openstreetmap.josm.data.UndoRedoHandler;
    1818import org.openstreetmap.josm.data.coor.LatLon;
    1919import org.openstreetmap.josm.data.osm.DataSet;
     
    5454        Collection<Node> nodesWay2 = new LinkedList<>();
    5555        if ((sel.size() != 2) || !(sel.toArray()[0] instanceof Way) || !(sel.toArray()[1] instanceof Way)) {
    56             JOptionPane.showMessageDialog(Main.parent, tr("Select two ways with a node in common"));
     56            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Select two ways with a node in common"));
    5757            return;
    5858        }
     
    6464                if (n.equals(m)) {
    6565                    if ( nodeCommon != null ) {
    66                         JOptionPane.showMessageDialog(Main.parent, tr("Select two ways with alone a node in common"));
     66                        JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Select two ways with alone a node in common"));
    6767                        return;
    6868                    }
     
    105105        for (int c=0;c<w2.length;c++)
    106106            cmds.add(new AddCommand(ds, w2[c]));
    107         Main.main.undoRedo.add(new SequenceCommand(tr("Create a grid of ways"), cmds));
     107        UndoRedoHandler.getInstance().add(new SequenceCommand(tr("Create a grid of ways"), cmds));
    108108        MainApplication.getMap().repaint();
    109109    }
Note: See TracChangeset for help on using the changeset viewer.