Ignore:
Timestamp:
2009-03-18T15:55:16+01:00 (16 years ago)
Author:
stoecker
Message:

fix the menu changes in JOSM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/grid/src/grid/GridPlugin.java

    r13497 r14120  
    1515import org.openstreetmap.josm.data.osm.DataSet;
    1616import org.openstreetmap.josm.data.osm.Node;
    17 import org.openstreetmap.josm.data.osm.Segment;
    1817import org.openstreetmap.josm.data.osm.Way;
    1918import org.openstreetmap.josm.data.osm.visitor.AddVisitor;
     
    2625    private class Action extends AbstractAction {
    2726    public Action() {
    28         super("add grid");
     27        super(tr("Add grid"));
    2928    }
    3029    public void actionPerformed(ActionEvent e) {
     
    3837
    3938    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);
    5542    }
    5643    @Override
Note: See TracChangeset for help on using the changeset viewer.