Browse Source

Fix issue with new path not being colored correctly in MapView drawing.

Holt59 3 years ago
parent
commit
7e079df22f
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      src/main/org/insa/graphics/drawing/components/MapViewDrawing.java

+ 5
- 5
src/main/org/insa/graphics/drawing/components/MapViewDrawing.java View File

@@ -424,7 +424,7 @@ public class MapViewDrawing extends MapView implements Drawing {
424 424
 
425 425
     @Override
426 426
     public PathOverlay drawPath(Path path, Color color, boolean markers) {
427
-        PolylineAutoScaling line = new PolylineAutoScaling(1, DEFAULT_PATH_COLOR);
427
+        PolylineAutoScaling line = new PolylineAutoScaling(1, color);
428 428
         ArrayList<Point> points = new ArrayList<>(path.getArcs().size() * 4);
429 429
         for (Arc arc: path.getArcs()) {
430 430
             points.addAll(arc.getPoints());
@@ -432,10 +432,10 @@ public class MapViewDrawing extends MapView implements Drawing {
432 432
         line.addAll(points);
433 433
         PathOverlay overlay = null;
434 434
         if (markers) {
435
-            MarkerAutoScaling origin = createMarker(path.getOrigin().getPoint(), DEFAULT_PATH_COLOR,
436
-                    DEFAULT_PATH_COLOR, AlphaMode.TRANSPARENT),
437
-                    destination = createMarker(path.getDestination().getPoint(), DEFAULT_PATH_COLOR,
438
-                            DEFAULT_PATH_COLOR, AlphaMode.TRANSPARENT);
435
+            MarkerAutoScaling origin = createMarker(path.getOrigin().getPoint(), color, color,
436
+                    AlphaMode.TRANSPARENT),
437
+                    destination = createMarker(path.getDestination().getPoint(), color, color,
438
+                            AlphaMode.TRANSPARENT);
439 439
             overlay = new MapViewPathOverlay(line, origin, destination);
440 440
         }
441 441
         else {

Loading…
Cancel
Save