Ticket #17263: 17263.patch
| File 17263.patch, 1.8 KB (added by , 7 years ago) |
|---|
-
src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
349 349 350 350 @Override 351 351 public void paint(MapViewGraphics graphics) { 352 List<WayPoint> visibleSegments = listVisibleSegments(graphics.getClipBounds().getLatLonBoundsBox());353 if (! visibleSegments.isEmpty()) {352 Bounds clipBounds = graphics.getClipBounds().getLatLonBoundsBox(); 353 if (!listVisibleSegments(clipBounds).isEmpty()) { 354 354 readPreferences(layer.getName()); 355 drawAll(graphics.getDefaultGraphics(), graphics.getMapView(), visibleSegments);355 drawAll(graphics.getDefaultGraphics(), graphics.getMapView(), clipBounds); 356 356 if (graphics.getMapView().getLayerManager().getActiveLayer() == layer) { 357 357 drawColorBar(graphics.getDefaultGraphics(), graphics.getMapView()); 358 358 } … … 409 409 * Draw all enabled GPX elements of layer. 410 410 * @param g the common draw object to use 411 411 * @param mv the meta data to current displayed area 412 * @param visibleSegments segments visible in the current scope of mv412 * @param clipBounds clip bounds 413 413 */ 414 public void drawAll(Graphics2D g, MapView mv, List<WayPoint> visibleSegments) {414 public void drawAll(Graphics2D g, MapView mv, Bounds clipBounds) { 415 415 416 416 final long timeStart = System.currentTimeMillis(); 417 417 … … 422 422 calculateColors(); 423 423 } 424 424 425 List<WayPoint> visibleSegments = listVisibleSegments(clipBounds); 425 426 fixColors(visibleSegments); 426 427 427 428 // backup the environment
