Changeset 3064 in josm
- Timestamp:
- 2010-03-01T21:26:51+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r3048 r3064 11 11 import org.openstreetmap.josm.Main; 12 12 import org.openstreetmap.josm.data.Bounds; 13 import org.openstreetmap.josm.data.coor.LatLon;14 13 import org.openstreetmap.josm.data.osm.DataSet; 15 14 import org.openstreetmap.josm.data.osm.DataSource; … … 64 63 new OsmServerLocationReader(url), 65 64 progressMonitor); 66 currentBounds = new Bounds(new LatLon(0,0), new LatLon(0,0)); 65 //currentBounds = new Bounds(new LatLon(0,0), new LatLon(0,0)); 66 currentBounds = null; 67 67 return Main.worker.submit(downloadTask); 68 68 } … … 139 139 if (dataSet == null) 140 140 return; // user canceled download or error occurred 141 if (currentBounds == null) 142 141 //if (currentBounds == null) 142 // return; // no data retrieved 143 143 if (dataSet.allPrimitives().isEmpty()) { 144 144 rememberErrorMessage(tr("No data found in this area.")); … … 156 156 OsmDataLayer layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null); 157 157 final boolean isDisplayingMapView = Main.isDisplayingMapView(); 158 158 159 159 Main.main.addLayer(layer); 160 160 … … 163 163 if (isDisplayingMapView) { 164 164 BoundingXYVisitor v = new BoundingXYVisitor(); 165 v.visit(currentBounds); 165 if (currentBounds != null) { 166 v.visit(currentBounds); 167 } else { 168 v.computeBoundingBox(dataSet.getNodes()); 169 } 166 170 Main.map.mapView.recalculateCenterScale(v); 167 171 } … … 174 178 target.mergeFrom(dataSet); 175 179 BoundingXYVisitor v = new BoundingXYVisitor(); 176 v.visit(currentBounds); 180 if (currentBounds != null) { 181 v.visit(currentBounds); 182 } else { 183 v.computeBoundingBox(dataSet.getNodes()); 184 } 177 185 Main.map.mapView.recalculateCenterScale(v); 178 186 target.onPostDownloadFromServer();
Note:
See TracChangeset
for help on using the changeset viewer.