Changeset 1823 in josm for trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
- Timestamp:
- 2009-07-22T20:33:41+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r1808 r1823 196 196 */ 197 197 @Override public void paint(final Graphics g, final MapView mv) { 198 boolean active = Main.map.mapView.getActiveLayer() == this;198 boolean active = mv.getActiveLayer() == this; 199 199 boolean inactive = !active && Main.pref.getBoolean("draw.data.inactive_color", true); 200 boolean virtual = !inactive && Main.map.mapView.isVirtualNodesEnabled();200 boolean virtual = !inactive && mv.isVirtualNodesEnabled(); 201 201 202 202 // draw the hatched area for non-downloaded region. only draw if we're the active … … 204 204 if (active && Main.pref.getBoolean("draw.data.downloaded_area", true) && !data.dataSources.isEmpty()) { 205 205 // initialize area with current viewport 206 Rectangle b = Main.map.mapView.getBounds();206 Rectangle b = mv.getBounds(); 207 207 // on some platforms viewport bounds seem to be offset from the left, 208 208 // over-grow it just to be sure … … 213 213 for (DataSource src : data.dataSources) { 214 214 if (src.bounds != null && !src.bounds.min.equals(src.bounds.max)) { 215 EastNorth en1 = Main.proj.latlon2eastNorth(src.bounds.min);216 EastNorth en2 = Main.proj.latlon2eastNorth(src.bounds.max);215 EastNorth en1 = mv.getProjection().latlon2eastNorth(src.bounds.min); 216 EastNorth en2 = mv.getProjection().latlon2eastNorth(src.bounds.max); 217 217 Point p1 = mv.getPoint(en1); 218 218 Point p2 = mv.getPoint(en2); … … 536 536 /** 537 537 * replies the set of conflicts currently managed in this layer 538 * 538 * 539 539 * @return the set of conflicts currently managed in this layer 540 540 */
Note:
See TracChangeset
for help on using the changeset viewer.