Rev | Line | |
---|
[1030] | 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;
|
---|
[1084] | 10 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
[1030] | 11 |
|
---|
| 12 | public class ToggleGPXLinesAction extends JosmAction {
|
---|
| 13 |
|
---|
[1169] | 14 | public ToggleGPXLinesAction() {
|
---|
| 15 | super(tr("Toggle GPX Lines"), "gps-lines", tr("Toggles the global setting ''{0}''.", tr("Draw lines between raw gps points.")),
|
---|
| 16 | Shortcut.registerShortcut("view:gpxlines", tr("View: {0}", tr("Toggle GPX Lines")), KeyEvent.VK_X, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true);
|
---|
| 17 | }
|
---|
[1030] | 18 |
|
---|
[1169] | 19 | public void actionPerformed(ActionEvent e) {
|
---|
| 20 | Main.pref.put("draw.rawgps.lines", !Main.pref.getBoolean("draw.rawgps.lines"));
|
---|
[1502] | 21 | if(Main.map != null)
|
---|
| 22 | Main.map.mapView.repaint();
|
---|
[1169] | 23 | }
|
---|
[1030] | 24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.