source: josm/trunk/src/org/openstreetmap/josm/actions/RedoAction.java@ 577

Last change on this file since 577 was 463, checked in by (none), 17 years ago

some more minor menu changes:

  • Edit/Redo should use the common keyboard shortcut Ctrl+Y
  • remove calls to no longer existing layer menu
  • exchange icons of Edit SelectAll and UnselectAll
File size: 785 bytes
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.awt.event.ActionEvent;
7import java.awt.event.InputEvent;
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.Main;
11
12
13/**
14 * Redoes the last command.
15 *
16 * @author imi
17 */
18public class RedoAction extends JosmAction {
19
20 /**
21 * Construct the action with "Undo" as label.
22 */
23 public RedoAction() {
24 super(tr("Redo"), "redo", tr("Redo the last undone action."), KeyEvent.VK_Y, InputEvent.CTRL_DOWN_MASK, true);
25 setEnabled(false);
26 }
27
28 public void actionPerformed(ActionEvent e) {
29 if (Main.map == null)
30 return;
31 Main.map.repaint();
32 Main.main.undoRedo.redo();
33 }
34}
Note: See TracBrowser for help on using the repository browser.