Ticket #12991: plugin-ElevationProfile-destroy.patch

File plugin-ElevationProfile-destroy.patch, 1.4 KB (added by michael2402, 10 years ago)
  • ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfilePlugin.java

    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;  
    2424public class ElevationProfilePlugin extends Plugin {
    2525
    2626        private ElevationMapMode eleMode;
    27     private IconToggleButton eleModeButton;
    2827        private static ElevationProfileLayer currentLayer;
    2928
    3029        /**
    public class ElevationProfilePlugin extends Plugin {  
    3635
    3736                try {
    3837                        eleMode = new ElevationMapMode("Elevation profile", Main.map);
    39             eleModeButton = new IconToggleButton(eleMode);
    4038
    4139                        JosmAction action = new AddElevationLayerAction();
    4240
    public class ElevationProfilePlugin extends Plugin {  
    6058                super.mapFrameInitialized(oldFrame, newFrame);
    6159
    6260                if (newFrame != null) {
    63             newFrame.addMapMode(eleModeButton);
     61                        newFrame.addMapMode(new IconToggleButton(eleMode));
    6462                        ElevationProfileDialog eleProfileDlg = new ElevationProfileDialog();
    6563                        eleProfileDlg.addModelListener(eleMode);
    6664                        eleProfileDlg.setProfileLayer(getCurrentLayer());