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

    r12620 r12630  
    1919import org.openstreetmap.josm.data.osm.NoteData;
    2020import org.openstreetmap.josm.data.preferences.IntegerProperty;
     21import org.openstreetmap.josm.gui.MainApplication;
     22import org.openstreetmap.josm.gui.MapFrame;
    2123import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    2224import org.openstreetmap.josm.gui.layer.NoteLayer;
     
    132134            if (!noteLayers.isEmpty()) {
    133135                noteLayers.get(0).getNoteData().addNotes(notesData);
    134                 if (Main.map != null && zoomAfterDownload) {
    135                     Main.map.mapView.scheduleZoomTo(new ViewportData(noteLayer.getViewProjectionBounds()));
     136                MapFrame map = MainApplication.getMap();
     137                if (map != null && zoomAfterDownload) {
     138                    map.mapView.scheduleZoomTo(new ViewportData(noteLayer.getViewProjectionBounds()));
    136139                }
    137140            } else {
Note: See TracChangeset for help on using the changeset viewer.