Last change
on this file since 1047 was 1047, checked in by cbrill, 16 years ago |
[Cleanup] Remove unused imports and unused variables, part 2
This cleanup does not include static imports for translation
|
-
Property svn:eol-style
set to
native
|
File size:
811 bytes
|
Line | |
---|
1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.actions;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import java.awt.event.ActionEvent;
|
---|
7 | import java.awt.event.KeyEvent;
|
---|
8 |
|
---|
9 | import org.openstreetmap.josm.Main;
|
---|
10 | import org.openstreetmap.josm.tools.ShortCut;
|
---|
11 |
|
---|
12 | /**
|
---|
13 | * Undoes the last command.
|
---|
14 | *
|
---|
15 | * @author imi
|
---|
16 | */
|
---|
17 | public class UndoAction extends JosmAction {
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Construct the action with "Undo" as label.
|
---|
21 | */
|
---|
22 | public UndoAction() {
|
---|
23 | super(tr("Undo"), "undo", tr("Undo the last action."),
|
---|
24 | ShortCut.registerShortCut("system:undo", tr("Edit: Undo"), KeyEvent.VK_Z, ShortCut.GROUP_MENU), 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.undo();
|
---|
33 | }
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.