Ignore:
Timestamp:
2017-08-24T00:15:51+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.map and Main.isDisplayingMapView(). Replacements: gui.MainApplication.getMap() / gui.MainApplication.isDisplayingMapView()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r12620 r12630  
    8989import org.openstreetmap.josm.data.projection.Projections;
    9090import org.openstreetmap.josm.gui.ExtendedDialog;
     91import org.openstreetmap.josm.gui.MainApplication;
    9192import org.openstreetmap.josm.gui.MapView;
    9293import org.openstreetmap.josm.gui.NavigatableComponent.ZoomChangeListener;
     
    261262
    262263    protected void initTileSource(T tileSource) {
    263         coordinateConverter = new TileCoordinateConverter(Main.map.mapView, tileSource, getDisplaySettings());
     264        coordinateConverter = new TileCoordinateConverter(MainApplication.getMap().mapView, tileSource, getDisplaySettings());
    264265        attribution.initialize(tileSource);
    265266
     
    852853
    853854    private TileSet getVisibleTileSet() {
    854         ProjectionBounds bounds = Main.map.mapView.getState().getViewArea().getProjectionBounds();
     855        ProjectionBounds bounds = MainApplication.getMap().mapView.getState().getViewArea().getProjectionBounds();
    855856        return getTileSet(bounds, currentZoomLevel);
    856857    }
     
    987988                drawImageInside(g, img, anchorImage, anchorScreen, null);
    988989            }
    989             if (tile instanceof ReprojectionTile && ((ReprojectionTile) tile).needsUpdate(Main.map.mapView.getScale())) {
     990            MapView mapView = MainApplication.getMap().mapView;
     991            if (tile instanceof ReprojectionTile && ((ReprojectionTile) tile).needsUpdate(mapView.getScale())) {
    990992                // This means we have a reprojected tile in memory cache, but not at
    991993                // current scale. Generally, the positioning of the tile will still
Note: See TracChangeset for help on using the changeset viewer.