From 7e44d0fb3fd7bf76987acb98ea96b934bd6673cb Mon Sep 17 00:00:00 2001 From: Oshgnacknak Date: Sun, 5 Sep 2021 21:18:33 +0200 Subject: [PATCH] Reset color if start node, if necessary --- src/main/java/de/oshgnacknak/gruphi/GruphiFrame.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/oshgnacknak/gruphi/GruphiFrame.java b/src/main/java/de/oshgnacknak/gruphi/GruphiFrame.java index 6d4eb4f..611a3d6 100644 --- a/src/main/java/de/oshgnacknak/gruphi/GruphiFrame.java +++ b/src/main/java/de/oshgnacknak/gruphi/GruphiFrame.java @@ -271,7 +271,10 @@ class GruphiFrame extends JFrame { } } private void clearPaths() { - startNode = null; + if (startNode != null) { + startNode.color = Node.COLOR; + startNode = null; + } paths = null; }