Changeset 33547 in osm for applications/editors/josm/plugins/imagery_offset_db/src/iodb/GetImageryOffsetAction.java
- Timestamp:
- 2017-08-26T21:28:34+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery_offset_db/src/iodb/GetImageryOffsetAction.java
r33309 r33547 21 21 import org.openstreetmap.josm.data.coor.LatLon; 22 22 import org.openstreetmap.josm.data.projection.Projection; 23 import org.openstreetmap.josm.gui.MainApplication; 23 24 import org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer; 24 25 import org.openstreetmap.josm.tools.ImageProvider; … … 54 55 @Override 55 56 public void actionPerformed(ActionEvent e) { 56 if ( Main.map == null || Main.map.mapView == null|| !Main.map.isVisible())57 if (!MainApplication.isDisplayingMapView() || !MainApplication.getMap().isVisible()) 57 58 return; 58 Projection proj = Main .map.mapView.getProjection();59 LatLon center = proj.eastNorth2latlon(Main .map.mapView.getCenter());59 Projection proj = MainApplication.getMap().mapView.getProjection(); 60 LatLon center = proj.eastNorth2latlon(MainApplication.getMap().mapView.getCenter()); 60 61 AbstractTileSourceLayer layer = ImageryOffsetTools.getTopImageryLayer(); 61 62 String imagery = ImageryOffsetTools.getImageryID(layer); … … 64 65 65 66 DownloadOffsetsTask download = new DownloadOffsetsTask(center, layer, imagery); 66 Main.worker.submit(download); 67 MainApplication.worker.submit(download); 67 68 } 68 69 … … 74 75 protected void updateEnabledState() { 75 76 boolean state = true; 76 if ( Main.map == null || Main.map.mapView == null|| !Main.map.isVisible())77 if (!MainApplication.isDisplayingMapView() || !MainApplication.getMap().isVisible()) 77 78 state = false; 78 79 AbstractTileSourceLayer layer = ImageryOffsetTools.getTopImageryLayer();
Note:
See TracChangeset
for help on using the changeset viewer.
