From f1d74d80402ba2a19884dfc189b1e8e3c7cdf7f4 Mon Sep 17 00:00:00 2001 From: Holt59 Date: Tue, 6 Mar 2018 11:57:34 +0100 Subject: [PATCH] Fix issue with click not being enable when an input was empty in nodes input panel. --- src/main/org/insa/graphics/NodesInputPanel.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/org/insa/graphics/NodesInputPanel.java b/src/main/org/insa/graphics/NodesInputPanel.java index cbbf9b3..b0af315 100644 --- a/src/main/org/insa/graphics/NodesInputPanel.java +++ b/src/main/org/insa/graphics/NodesInputPanel.java @@ -248,6 +248,9 @@ public class NodesInputPanel extends JPanel } else if (tracker != null) { tracker.setVisible(false); + if (getInputToFill() == null) { + nextInputToFill(); + } } // Create array of nodes @@ -399,7 +402,8 @@ public class NodesInputPanel extends JPanel for (JTextField input: nodeInputs) { MarkerOverlay tracker = markerTrackers.getOrDefault(input, null); if (tracker != null) { - MarkerOverlay newMarker = this.drawing.drawMarker(tracker.getPoint(), tracker.getColor()); + MarkerOverlay newMarker = this.drawing.drawMarker(tracker.getPoint(), + tracker.getColor()); markerTrackers.put(input, newMarker); newMarker.setVisible(tracker.isVisible()); tracker.delete();