Changeset 14120 in osm for applications/editors/josm/plugins/grid
- Timestamp:
- 2009-03-18T15:55:16+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/grid/src/grid/GridPlugin.java
r13497 r14120 15 15 import org.openstreetmap.josm.data.osm.DataSet; 16 16 import org.openstreetmap.josm.data.osm.Node; 17 import org.openstreetmap.josm.data.osm.Segment;18 17 import org.openstreetmap.josm.data.osm.Way; 19 18 import org.openstreetmap.josm.data.osm.visitor.AddVisitor; … … 26 25 private class Action extends AbstractAction { 27 26 public Action() { 28 super( "add grid");27 super(tr("Add grid")); 29 28 } 30 29 public void actionPerformed(ActionEvent e) { … … 38 37 39 38 public GridPlugin() { 40 JMenuBar menu = Main.main.menu; 41 edit = null; 42 for (int i = 0; i < menu.getMenuCount(); ++i) { 43 if (menu.getMenu(i) != null && tr("Edit").equals(menu.getMenu(i).getName())) { 44 edit = menu.getMenu(i); 45 break; 46 } 47 } 48 if (edit == null) { 49 edit = new JMenu(tr("Edit")); 50 menu.add(edit, 2); 51 edit.setVisible(false); 52 } 53 edit.add(addGridMenu); 54 addGridMenu.setVisible(false); 39 edit = Main.main.menu.editMenu; 40 edit.add(addGridMenu); 41 addGridMenu.setVisible(false); 55 42 } 56 43 @Override
Note:
See TracChangeset
for help on using the changeset viewer.