|
Last change
on this file since 178 was 178, checked in by imi, 19 years ago |
- fixed display of tooltip shortcuts
- added icon=... to annotation presets
- added support for putting annotation presets in the toolbar
|
|
File size:
652 bytes
|
| Rev | Line | |
|---|
| [169] | 1 | package org.openstreetmap.josm.actions;
|
|---|
| 2 |
|
|---|
| 3 | import static org.openstreetmap.josm.tools.I18n.tr;
|
|---|
| 4 |
|
|---|
| 5 | import java.awt.event.ActionEvent;
|
|---|
| [172] | 6 | import java.awt.event.InputEvent;
|
|---|
| [169] | 7 | import java.awt.event.KeyEvent;
|
|---|
| 8 |
|
|---|
| 9 | import org.openstreetmap.josm.Main;
|
|---|
| 10 |
|
|---|
| 11 | public class NewAction extends JosmAction {
|
|---|
| 12 |
|
|---|
| 13 | public NewAction() {
|
|---|
| [178] | 14 | super(tr("New"), "new", tr("Create a new map."), KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK, true);
|
|---|
| [169] | 15 | }
|
|---|
| 16 |
|
|---|
| 17 | public void actionPerformed(ActionEvent e) {
|
|---|
| 18 | if (Main.breakBecauseUnsavedChanges())
|
|---|
| 19 | return;
|
|---|
| 20 | if (Main.map != null)
|
|---|
| 21 | Main.main.removeLayer(Main.main.editLayer());
|
|---|
| 22 | Main.main.editLayer(); // create new if empty
|
|---|
| 23 | }
|
|---|
| 24 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.