Changeset 34499 in osm
- Timestamp:
- 2018-08-18T03:38:20+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/Create_grid_of_ways
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/Create_grid_of_ways/build.xml
r33856 r34499 4 4 <property name="commit.message" value="Changed constructor signature, updated build.xml"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 2630"/>6 <property name="plugin.main.version" value="14153"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java
r34380 r34499 11 11 import javax.swing.JOptionPane; 12 12 13 import org.openstreetmap.josm.Main;14 13 import org.openstreetmap.josm.actions.JosmAction; 15 14 import org.openstreetmap.josm.command.AddCommand; 16 15 import org.openstreetmap.josm.command.Command; 17 16 import org.openstreetmap.josm.command.SequenceCommand; 17 import org.openstreetmap.josm.data.UndoRedoHandler; 18 18 import org.openstreetmap.josm.data.coor.LatLon; 19 19 import org.openstreetmap.josm.data.osm.DataSet; … … 54 54 Collection<Node> nodesWay2 = new LinkedList<>(); 55 55 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")); 57 57 return; 58 58 } … … 64 64 if (n.equals(m)) { 65 65 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")); 67 67 return; 68 68 } … … 105 105 for (int c=0;c<w2.length;c++) 106 106 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)); 108 108 MainApplication.getMap().repaint(); 109 109 }
Note:
See TracChangeset
for help on using the changeset viewer.