Changeset 12579 in osm for applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin
- Timestamp:
- 2008-12-25T14:36:26+01:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/SimplifyWayAction.java
r12443 r12579 27 27 import org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor; 28 28 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 29 import org.openstreetmap.josm.tools.Shortcut; 29 30 30 31 public class SimplifyWayAction extends JosmAction { 31 32 public SimplifyWayAction() { 32 super(tr("Simplify Way"), "simplify", tr("Delete unnecessary nodes from a way."), KeyEvent.VK_Y,33 KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true);33 super(tr("Simplify Way"), "simplify", tr("Delete unnecessary nodes from a way."), Shortcut.registerShortcut("tools:simplify", tr("Tool: {0}", tr("Simplify Way")), 34 KeyEvent.VK_Y, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true); 34 35 } 35 36 -
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/UtilsPlugin.java
r11974 r12579 17 17 import org.openstreetmap.josm.plugins.Plugin; 18 18 import org.openstreetmap.josm.gui.MapFrame; 19 import org.openstreetmap.josm.gui.MainMenu; 19 20 import org.openstreetmap.josm.gui.IconToggleButton; 20 21 import org.openstreetmap.josm.actions.JosmAction; … … 24 25 25 26 public UtilsPlugin() { 26 JosmAction action; 27 28 action = new SimplifyWayAction(); 29 SimplifyWay = Main.main.menu.toolsMenu.add(action); 30 SimplifyWay.setAccelerator(action.shortcut); 27 SimplifyWay = MainMenu.add(Main.main.menu.toolsMenu, new SimplifyWayAction()); 31 28 SimplifyWay.setEnabled(false); 32 29 }
Note:
See TracChangeset
for help on using the changeset viewer.