Fix issue with nodes input panel getting enabled by indavertance.
This commit is contained in:
parent
7827bfc63c
commit
8e68377772
@ -285,7 +285,6 @@ public class MainWindow extends JFrame {
|
|||||||
threadTimer.stop();
|
threadTimer.stop();
|
||||||
threadPanel.setVisible(false);
|
threadPanel.setVisible(false);
|
||||||
currentThread.setThread(null);
|
currentThread.setThread(null);
|
||||||
spPanel.setEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayShortestPathSolution(ShortestPathSolution solution) {
|
private void displayShortestPathSolution(ShortestPathSolution solution) {
|
||||||
|
@ -392,7 +392,9 @@ public class NodesInputPanel extends JPanel
|
|||||||
for (JTextField input: nodeInputs) {
|
for (JTextField input: nodeInputs) {
|
||||||
MarkerOverlay tracker = markerTrackers.getOrDefault(input, null);
|
MarkerOverlay tracker = markerTrackers.getOrDefault(input, null);
|
||||||
if (tracker != null) {
|
if (tracker != null) {
|
||||||
markerTrackers.put(input, 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();
|
tracker.delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,6 +170,7 @@ public class ShortestPathPanel extends JPanel {
|
|||||||
this.nodesInputPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
|
this.nodesInputPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
|
||||||
nodesInputPanel.addTextField("Origin: ", new Color(57, 172, 115));
|
nodesInputPanel.addTextField("Origin: ", new Color(57, 172, 115));
|
||||||
nodesInputPanel.addTextField("Destination: ", new Color(255, 77, 77));
|
nodesInputPanel.addTextField("Destination: ", new Color(255, 77, 77));
|
||||||
|
nodesInputPanel.setEnabled(false);
|
||||||
|
|
||||||
add(this.nodesInputPanel);
|
add(this.nodesInputPanel);
|
||||||
components.add(this.nodesInputPanel);
|
components.add(this.nodesInputPanel);
|
||||||
|
Loading…
Reference in New Issue
Block a user