Changeset 33562 in osm
- Timestamp:
- 2017-08-27T19:21:21+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayer.java
r33372 r33562 34 34 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 35 35 import org.openstreetmap.josm.gui.ExtendedDialog; 36 import org.openstreetmap.josm.gui.MainApplication; 36 37 import org.openstreetmap.josm.gui.MapView; 37 38 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; … … 299 300 BoundingXYVisitor boundingXYVisitor = new BoundingXYVisitor(); 300 301 visitBoundingBox(boundingXYVisitor); 301 Main .map.mapView.zoomTo(boundingXYVisitor);302 MainApplication.getMap().mapView.zoomTo(boundingXYVisitor); 302 303 } 303 304 -
applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImportImageFileImporter.java
r33557 r33562 12 12 import org.openstreetmap.josm.actions.ExtensionFileFilter; 13 13 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 14 import org.openstreetmap.josm.gui.MainApplication; 14 15 import org.openstreetmap.josm.gui.io.importexport.FileImporter; 15 16 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 50 51 layer = new ImageLayer(file); 51 52 } catch (LayerCreationCanceledException e) { 52 // if user decides that layer should not be created just return.53 // if user decides that layer should not be created just return. 53 54 continue; 54 55 } catch (Exception e) { … … 59 60 60 61 // Add layer: 61 Main .getLayerManager().addLayer(layer);62 MainApplication.getLayerManager().addLayer(layer); 62 63 BoundingXYVisitor boundingXYVisitor = new BoundingXYVisitor(); 63 64 layer.visitBoundingBox(boundingXYVisitor); 64 Main .map.mapView.zoomTo(boundingXYVisitor);65 MainApplication.getMap().mapView.zoomTo(boundingXYVisitor); 65 66 } 66 67 }
Note:
See TracChangeset
for help on using the changeset viewer.