Changeset 34531 in osm
- Timestamp:
- 2018-08-18T18:49:36+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/michigan_left
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/michigan_left/build.xml
r33880 r34531 4 4 <property name="commit.message" value="Changed the constructor signature of the plugin main class"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 2643"/>6 <property name="plugin.main.version" value="14153"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeft.java
r33880 r34531 15 15 import javax.swing.JOptionPane; 16 16 17 import org.openstreetmap.josm.Main;18 17 import org.openstreetmap.josm.actions.JosmAction; 19 18 import org.openstreetmap.josm.command.AddCommand; 20 19 import org.openstreetmap.josm.command.Command; 21 20 import org.openstreetmap.josm.command.SequenceCommand; 21 import org.openstreetmap.josm.data.UndoRedoHandler; 22 22 import org.openstreetmap.josm.data.osm.DataSet; 23 23 import org.openstreetmap.josm.data.osm.Node; … … 76 76 77 77 if ((ways != 4) && (ways != 5)) { 78 JOptionPane.showMessageDialog(Main .parent,78 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 79 79 tr("Please select 4 or 5 ways to assign no left turns.")); 80 80 return; … … 92 92 } 93 93 if (extremNodes.size() != 4) { 94 JOptionPane.showMessageDialog(Main .parent,94 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 95 95 tr("Please select 4 ways that form a closed relation.")); 96 96 return; … … 116 116 } 117 117 if (!found) { 118 JOptionPane.showMessageDialog(Main .parent,118 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 119 119 tr("Unable to order the ways. Please verify their directions")); 120 120 return; … … 131 131 } 132 132 Command c = new SequenceCommand(tr("Create Michigan left turn restriction"), cmds); 133 Main.main.undoRedo.add(c);133 UndoRedoHandler.getInstance().add(c); 134 134 cmds.clear(); 135 135 } … … 157 157 158 158 if (viaNodes.size() != 2) { 159 JOptionPane.showMessageDialog(Main .parent,159 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 160 160 tr("Unable to find via nodes. Please check your selection")); 161 161 return; … … 198 198 } 199 199 Command c = new SequenceCommand(tr("Create Michigan left turn restriction"), cmds); 200 Main.main.undoRedo.add(c);200 UndoRedoHandler.getInstance().add(c); 201 201 cmds.clear(); 202 202 }
Note:
See TracChangeset
for help on using the changeset viewer.