Ticket #17263: 17263.patch

File 17263.patch, 1.8 KB (added by GerdP, 7 years ago)

Workaround

  • src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java

     
    349349
    350350    @Override
    351351    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()) {
    354354            readPreferences(layer.getName());
    355             drawAll(graphics.getDefaultGraphics(), graphics.getMapView(), visibleSegments);
     355            drawAll(graphics.getDefaultGraphics(), graphics.getMapView(), clipBounds);
    356356            if (graphics.getMapView().getLayerManager().getActiveLayer() == layer) {
    357357                drawColorBar(graphics.getDefaultGraphics(), graphics.getMapView());
    358358            }
     
    409409     * Draw all enabled GPX elements of layer.
    410410     * @param g               the common draw object to use
    411411     * @param mv              the meta data to current displayed area
    412      * @param visibleSegments segments visible in the current scope of mv
     412     * @param clipBounds      clip bounds
    413413     */
    414     public void drawAll(Graphics2D g, MapView mv, List<WayPoint> visibleSegments) {
     414    public void drawAll(Graphics2D g, MapView mv, Bounds clipBounds) {
    415415
    416416        final long timeStart = System.currentTimeMillis();
    417417
     
    422422            calculateColors();
    423423        }
    424424
     425        List<WayPoint> visibleSegments = listVisibleSegments(clipBounds);
    425426        fixColors(visibleSegments);
    426427
    427428        // backup the environment