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/actions/downloadtasks/DownloadOsmTask.java

    r12620 r12630  
    2727import org.openstreetmap.josm.data.osm.Way;
    2828import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
     29import org.openstreetmap.josm.gui.MainApplication;
     30import org.openstreetmap.josm.gui.MapFrame;
    2931import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    3032import org.openstreetmap.josm.gui.io.UpdatePrimitivesTask;
     
    228230
    229231        protected OsmDataLayer getEditLayer() {
    230             if (!Main.isDisplayingMapView()) return null;
     232            if (!MainApplication.isDisplayingMapView()) return null;
    231233            return Main.getLayerManager().getEditLayer();
    232234        }
     
    280282                Collection<OsmPrimitive> primitivesToUpdate = searchPrimitivesToUpdate(bounds, layer.data);
    281283                layer.mergeFrom(dataSet);
    282                 if (Main.map != null && zoomAfterDownload && bounds != null) {
    283                     Main.map.mapView.zoomTo(new ViewportData(computeBbox(bounds)));
     284                MapFrame map = MainApplication.getMap();
     285                if (map != null && zoomAfterDownload && bounds != null) {
     286                    map.mapView.zoomTo(new ViewportData(computeBbox(bounds)));
    284287                }
    285288                if (!primitivesToUpdate.isEmpty()) {
Note: See TracChangeset for help on using the changeset viewer.