From 7e079df22f117521ee3cfaccd8b32356c614e825 Mon Sep 17 00:00:00 2001 From: Holt59 Date: Wed, 14 Mar 2018 22:07:25 +0100 Subject: [PATCH] Fix issue with new path not being colored correctly in MapView drawing. --- .../graphics/drawing/components/MapViewDrawing.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/org/insa/graphics/drawing/components/MapViewDrawing.java b/src/main/org/insa/graphics/drawing/components/MapViewDrawing.java index 253db6d..5ed4e8c 100644 --- a/src/main/org/insa/graphics/drawing/components/MapViewDrawing.java +++ b/src/main/org/insa/graphics/drawing/components/MapViewDrawing.java @@ -424,7 +424,7 @@ public class MapViewDrawing extends MapView implements Drawing { @Override public PathOverlay drawPath(Path path, Color color, boolean markers) { - PolylineAutoScaling line = new PolylineAutoScaling(1, DEFAULT_PATH_COLOR); + PolylineAutoScaling line = new PolylineAutoScaling(1, color); ArrayList points = new ArrayList<>(path.getArcs().size() * 4); for (Arc arc: path.getArcs()) { points.addAll(arc.getPoints()); @@ -432,10 +432,10 @@ public class MapViewDrawing extends MapView implements Drawing { line.addAll(points); PathOverlay overlay = null; if (markers) { - MarkerAutoScaling origin = createMarker(path.getOrigin().getPoint(), DEFAULT_PATH_COLOR, - DEFAULT_PATH_COLOR, AlphaMode.TRANSPARENT), - destination = createMarker(path.getDestination().getPoint(), DEFAULT_PATH_COLOR, - DEFAULT_PATH_COLOR, AlphaMode.TRANSPARENT); + MarkerAutoScaling origin = createMarker(path.getOrigin().getPoint(), color, color, + AlphaMode.TRANSPARENT), + destination = createMarker(path.getDestination().getPoint(), color, color, + AlphaMode.TRANSPARENT); overlay = new MapViewPathOverlay(line, origin, destination); } else {