Changeset 32485 in osm


Ignore:
Timestamp:
2016-07-01T09:42:37+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxLayer.java

    r32263 r32485  
    150150                Main.map.selectZoomTool(false); // Select tool might not be support of active layer, zoom is always supported
    151151            }
    152             Main.main.addLayer(new GpxLayer(toGpxData(false), tr("Converted from: {0}", getName())));
    153             Main.main.removeLayer(EditGpxLayer.this);
     152            Main.getLayerManager().addLayer(new GpxLayer(toGpxData(false), tr("Converted from: {0}", getName())));
     153            Main.getLayerManager().removeLayer(EditGpxLayer.this);
    154154        }
    155155    }
     
    170170                Main.map.selectZoomTool(false); // Select tool might not be support of active layer, zoom is always supported
    171171            }
    172             Main.main.addLayer(new GpxLayer(toGpxData(true), tr("Converted from: {0}", getName())));
    173             Main.main.removeLayer(EditGpxLayer.this);
     172            Main.getLayerManager().addLayer(new GpxLayer(toGpxData(true), tr("Converted from: {0}", getName())));
     173            Main.getLayerManager().removeLayer(EditGpxLayer.this);
    174174        }
    175175    }
  • applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxMode.java

    r32263 r32485  
    165165        if(currentEditLayer == null) {
    166166            currentEditLayer = new EditGpxLayer(new EditGpxData());
    167             Main.main.addLayer(currentEditLayer);
     167            Main.getLayerManager().addLayer(currentEditLayer);
    168168            currentEditLayer.initializeImport();
    169169        }
Note: See TracChangeset for help on using the changeset viewer.