Index: src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
===================================================================
--- src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 14735)
+++ src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(working copy)
@@ -349,10 +349,10 @@
 
     @Override
     public void paint(MapViewGraphics graphics) {
-        List<WayPoint> visibleSegments = listVisibleSegments(graphics.getClipBounds().getLatLonBoundsBox());
-        if (!visibleSegments.isEmpty()) {
+        Bounds clipBounds = graphics.getClipBounds().getLatLonBoundsBox();
+        if (!listVisibleSegments(clipBounds).isEmpty()) {
             readPreferences(layer.getName());
-            drawAll(graphics.getDefaultGraphics(), graphics.getMapView(), visibleSegments);
+            drawAll(graphics.getDefaultGraphics(), graphics.getMapView(), clipBounds);
             if (graphics.getMapView().getLayerManager().getActiveLayer() == layer) {
                 drawColorBar(graphics.getDefaultGraphics(), graphics.getMapView());
             }
@@ -409,9 +409,9 @@
      * Draw all enabled GPX elements of layer.
      * @param g               the common draw object to use
      * @param mv              the meta data to current displayed area
-     * @param visibleSegments segments visible in the current scope of mv
+     * @param clipBounds      clip bounds
      */
-    public void drawAll(Graphics2D g, MapView mv, List<WayPoint> visibleSegments) {
+    public void drawAll(Graphics2D g, MapView mv, Bounds clipBounds) {
 
         final long timeStart = System.currentTimeMillis();
 
@@ -422,6 +422,7 @@
             calculateColors();
         }
 
+        List<WayPoint> visibleSegments = listVisibleSegments(clipBounds);
         fixColors(visibleSegments);
 
         // backup the environment
