Changeset 7345 in josm for trunk/src/org


Ignore:
Timestamp:
2014-07-28T20:43:39+02:00 (10 years ago)
Author:
akks
Message:

see #10269: avoid null color values in GpxLayer for sure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java

    r7340 r7345  
    201201           g.setStroke(new BasicStroke(lineWidth,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
    202202        }
     203        fixColors(visibleSegments);
    203204        drawLines(g, mv, visibleSegments);
    204205        drawArrows(g, mv, visibleSegments);
     
    503504    }
    504505
     506    private void fixColors(List<WayPoint> visibleSegments) {
     507        for (WayPoint trkPnt : visibleSegments) {
     508            if (trkPnt.customColoring == null) {
     509                trkPnt.customColoring = neutralColor;
     510            }
     511        }
     512    }
     513
    505514    /**
    506515     * Check cache validity set necessary flags
Note: See TracChangeset for help on using the changeset viewer.