Ignore:
Timestamp:
2010-12-17T18:38:40+01:00 (14 years ago)
Author:
bastik
Message:

'Add selectWayNodes action by vetinari (see #j5745)'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/UtilsPlugin2.java

    r24236 r24787  
    1414    JMenuItem addIntersections;
    1515    JMenuItem splitObject;
     16    JMenuItem selectWayNodes;
    1617
    1718    public UtilsPlugin2(PluginInformation info) {
     
    2122        addIntersections = MainMenu.add(Main.main.menu.toolsMenu, new AddIntersectionsAction());
    2223        splitObject = MainMenu.add(Main.main.menu.toolsMenu, new SplitObjectAction());
     24        selectWayNodes = MainMenu.add(Main.main.menu.toolsMenu, new SelectWayNodesAction());
    2325    }
    2426
    2527    @Override
    2628    public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
    27         if (oldFrame == null && newFrame != null) {
    28             unglueRelation.setEnabled(true);
    29             addIntersections.setEnabled(true);
    30             splitObject.setEnabled(true);
    31         }
     29        boolean enabled = newFrame != null;
     30        unglueRelation.setEnabled(enabled);
     31        addIntersections.setEnabled(enabled);
     32        splitObject.setEnabled(enabled);
     33        selectWayNodes.setEnabled(enabled);
    3234    }
    3335}
Note: See TracChangeset for help on using the changeset viewer.