Ignore:
Timestamp:
2016-06-19T16:08:56+02:00 (9 years ago)
Author:
donvip
Message:

fix #josm12953 - Replace most uses of MapView.getActiveLayer and similar methods (patch by michael2402, modified) - gsoc-core

Location:
applications/editors/josm/plugins/NanoLog/src/nanolog
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/NanoLog/src/nanolog/GPXChooser.java

    r30491 r32329  
    1919    public static GpxLayer topLayer() {
    2020        // return first found local layer
    21         for( Layer layer : Main.map.mapView.getAllLayers() ) {
     21        for( Layer layer : Main.getLayerManager().getLayers() ) {
    2222            if( layer instanceof GpxLayer && ((GpxLayer)layer).isLocalFile() )
    2323                return (GpxLayer)layer;
  • applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java

    r31981 r32329  
    298298        public void mousePressed( MouseEvent e ) {
    299299            int nearest = nearestEntry(e);
    300             if( nearest > 0 && Main.map.mapView.getActiveLayer() == NanoLogLayer.this ) {
     300            if( nearest > 0 && Main.getLayerManager().getActiveLayer() == NanoLogLayer.this ) {
    301301                dragging = nearest;
    302302                doDrag(e);
  • applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java

    r30737 r32329  
    3737    public void updateMarkers() {
    3838        List<NanoLogEntry> entries = new ArrayList<>();
    39         for( NanoLogLayer l : Main.map.mapView.getLayersOfType(NanoLogLayer.class) ) {
     39        for( NanoLogLayer l : Main.getLayerManager().getLayersOfType(NanoLogLayer.class) ) {
    4040            entries.addAll(l.getEntries());
    4141        }
Note: See TracChangeset for help on using the changeset viewer.