Changeset 13434 in josm for trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
- Timestamp:
- 2018-02-18T05:02:23+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
r13426 r13434 48 48 import org.openstreetmap.josm.data.imagery.TileLoaderFactory; 49 49 import org.openstreetmap.josm.data.osm.BBox; 50 import org.openstreetmap.josm.data.osm.DataSet; 50 51 import org.openstreetmap.josm.data.preferences.BooleanProperty; 51 52 import org.openstreetmap.josm.data.preferences.StringProperty; … … 53 54 import org.openstreetmap.josm.gui.layer.AbstractCachedTileSourceLayer; 54 55 import org.openstreetmap.josm.gui.layer.MainLayerManager; 55 import org.openstreetmap.josm.gui.layer.OsmDataLayer;56 56 import org.openstreetmap.josm.gui.layer.TMSLayer; 57 57 import org.openstreetmap.josm.spi.preferences.Config; … … 237 237 Graphics2D g2d = (Graphics2D) g; 238 238 239 // draw shaded area for non-downloaded region of current "edit layer", but only if there *is* a current "edit layer",239 // draw shaded area for non-downloaded region of current data set, but only if there *is* a current data set, 240 240 // and it has defined bounds. Routine is analogous to that in OsmDataLayer's paint routine (but just different 241 241 // enough to make sharing code impractical) 242 final OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();243 if ( editLayer != null && this.showDownloadAreaButtonModel.isSelected() && !editLayer.data.getDataSources().isEmpty()) {242 final DataSet ds = MainApplication.getLayerManager().getActiveDataSet(); 243 if (ds != null && this.showDownloadAreaButtonModel.isSelected() && !ds.getDataSources().isEmpty()) { 244 244 // initialize area with current viewport 245 245 Rectangle b = this.getBounds(); … … 249 249 250 250 // combine successively downloaded areas after converting to screen-space 251 for (Bounds bounds : editLayer.data.getDataSourceBounds()) {251 for (Bounds bounds : ds.getDataSourceBounds()) { 252 252 if (bounds.isCollapsed()) { 253 253 continue;
Note:
See TracChangeset
for help on using the changeset viewer.