diff --git a/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfilePlugin.java b/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfilePlugin.java
index 24f4756..a7330e1 100644
|
a
|
b
|
import org.openstreetmap.josm.plugins.elevation.gui.ElevationProfileLayer;
|
| 24 | 24 | public class ElevationProfilePlugin extends Plugin { |
| 25 | 25 | |
| 26 | 26 | private ElevationMapMode eleMode; |
| 27 | | private IconToggleButton eleModeButton; |
| 28 | 27 | private static ElevationProfileLayer currentLayer; |
| 29 | 28 | |
| 30 | 29 | /** |
| … |
… |
public class ElevationProfilePlugin extends Plugin {
|
| 36 | 35 | |
| 37 | 36 | try { |
| 38 | 37 | eleMode = new ElevationMapMode("Elevation profile", Main.map); |
| 39 | | eleModeButton = new IconToggleButton(eleMode); |
| 40 | 38 | |
| 41 | 39 | JosmAction action = new AddElevationLayerAction(); |
| 42 | 40 | |
| … |
… |
public class ElevationProfilePlugin extends Plugin {
|
| 60 | 58 | super.mapFrameInitialized(oldFrame, newFrame); |
| 61 | 59 | |
| 62 | 60 | if (newFrame != null) { |
| 63 | | newFrame.addMapMode(eleModeButton); |
| | 61 | newFrame.addMapMode(new IconToggleButton(eleMode)); |
| 64 | 62 | ElevationProfileDialog eleProfileDlg = new ElevationProfileDialog(); |
| 65 | 63 | eleProfileDlg.addModelListener(eleMode); |
| 66 | 64 | eleProfileDlg.setProfileLayer(getCurrentLayer()); |