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/duplicateway/src/org/openstreetmap/josm/plugins/duplicateway/DuplicateWayPlugin.java

    r13497 r14120  
    2020  public DuplicateWayPlugin() {
    2121    name = tr("Duplicate Way");
    22     JMenu toolsMenu = null;
    23     for (int i = 0; i < Main.main.menu.getMenuCount() && toolsMenu == null; i++) {
    24       JMenu menu = Main.main.menu.getMenu(i);
    25       String name = menu.getText();
    26       if (name != null && name.equals(tr("Tools"))) {
    27         toolsMenu = menu;
    28       }
    29     }
    30 
    31     if (toolsMenu == null) {
    32       toolsMenu = new JMenu(name);
    33       toolsMenu.add(new JMenuItem(new DuplicateWayAction()));
    34       Main.main.menu.add(toolsMenu, 2);
    35     }
    36     else {
    37       toolsMenu.addSeparator();
    38       toolsMenu.add(new JMenuItem(new DuplicateWayAction()));
    39     }
    40 
     22    JMenu toolsMenu = Main.main.menu.toolsMenu;
     23    toolsMenu.addSeparator();
     24    toolsMenu.add(new JMenuItem(new DuplicateWayAction()));
    4125  }
    42 
    4326}
Note: See TracChangeset for help on using the changeset viewer.