Changeset 7816 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2014-12-17T01:49:45+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmImporter.java
r7392 r7816 14 14 import org.openstreetmap.josm.actions.ExtensionFileFilter; 15 15 import org.openstreetmap.josm.data.osm.DataSet; 16 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 16 17 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 17 18 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; … … 32 33 public static class OsmImporterData { 33 34 34 private OsmDataLayer layer;35 private Runnable postLayerTask;35 private final OsmDataLayer layer; 36 private final Runnable postLayerTask; 36 37 37 38 public OsmImporterData(OsmDataLayer layer, Runnable postLayerTask) { … … 102 103 @Override 103 104 public void run() { 104 Main.main.addLayer(data.layer); 105 data.postLayerTask.run(); 106 data.layer.onPostLoadFromFile(); 105 OsmDataLayer layer = data.getLayer(); 106 BoundingXYVisitor v = new BoundingXYVisitor(); 107 v.visit(layer.data.getDataSourceBoundingBox()); 108 if (!v.hasExtend()) { 109 v.computeBoundingBox(layer.data.getNodes()); 110 } 111 Main.main.addLayer(layer, v.getBounds()); 112 data.getPostLayerTask().run(); 113 data.getLayer().onPostLoadFromFile(); 107 114 } 108 115 });
Note:
See TracChangeset
for help on using the changeset viewer.