From 03a26ab083016814f88f8c7eefc4c7b66038bb6c Mon Sep 17 00:00:00 2001 From: Holt59 Date: Wed, 28 Feb 2018 20:57:52 +0100 Subject: [PATCH] Do not draw oneWay arc twice. --- src/main/org/insa/graphics/drawing/BasicDrawing.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/org/insa/graphics/drawing/BasicDrawing.java b/src/main/org/insa/graphics/drawing/BasicDrawing.java index 06da0cd..889c79e 100644 --- a/src/main/org/insa/graphics/drawing/BasicDrawing.java +++ b/src/main/org/insa/graphics/drawing/BasicDrawing.java @@ -509,7 +509,9 @@ public class BasicDrawing extends JPanel implements Drawing { this.initialize(graph); for (Node node: graph.getNodes()) { for (Arc arc: node.getSuccessors()) { - drawArc(arc, palette); + if (arc.getInfo().isOneWay() || arc.getOrigin().compareTo(arc.getDestination()) < 0) { + drawArc(arc, palette); + } } } }