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/DownloadAction.java

    r12620 r12630  
    2424import org.openstreetmap.josm.data.ProjectionBounds;
    2525import org.openstreetmap.josm.data.ViewportData;
     26import org.openstreetmap.josm.gui.MainApplication;
     27import org.openstreetmap.josm.gui.MapFrame;
    2628import org.openstreetmap.josm.gui.download.DownloadDialog;
    2729import org.openstreetmap.josm.gui.util.GuiHelper;
     
    125127                }
    126128                // Zoom to the larger download bounds
    127                 if (Main.map != null && bounds != null) {
     129                MapFrame map = MainApplication.getMap();
     130                if (map != null && bounds != null) {
    128131                    final ProjectionBounds pb = bounds;
    129                     GuiHelper.runInEDTAndWait(() -> Main.map.mapView.zoomTo(new ViewportData(pb)));
     132                    GuiHelper.runInEDTAndWait(() -> map.mapView.zoomTo(new ViewportData(pb)));
    130133                }
    131134            });
Note: See TracChangeset for help on using the changeset viewer.