Fix issue with NodesInputPanel getting enable when clearing threads.
This commit is contained in:
parent
03a26ab083
commit
a4e7a6f708
@ -123,7 +123,6 @@ public class MainWindow extends JFrame {
|
|||||||
// Log stream and print stream
|
// Log stream and print stream
|
||||||
private StreamCapturer logStream;
|
private StreamCapturer logStream;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private PrintStream printStream;
|
private PrintStream printStream;
|
||||||
|
|
||||||
// Current running thread
|
// Current running thread
|
||||||
@ -142,6 +141,8 @@ public class MainWindow extends JFrame {
|
|||||||
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||||
setLayout(new BorderLayout());
|
setLayout(new BorderLayout());
|
||||||
|
|
||||||
|
setMinimumSize(new Dimension(800, 600));
|
||||||
|
|
||||||
// Create drawing and action listeners...
|
// Create drawing and action listeners...
|
||||||
this.basicDrawing = new BasicDrawing();
|
this.basicDrawing = new BasicDrawing();
|
||||||
this.mapViewDrawing = new MapViewDrawing();
|
this.mapViewDrawing = new MapViewDrawing();
|
||||||
@ -272,9 +273,6 @@ public class MainWindow extends JFrame {
|
|||||||
threadTimer.stop();
|
threadTimer.stop();
|
||||||
threadPanel.setVisible(false);
|
threadPanel.setVisible(false);
|
||||||
currentThread.setThread(null);
|
currentThread.setThread(null);
|
||||||
if (spPanel != null) {
|
|
||||||
spPanel.setEnabled(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayShortestPathSolution(ShortestPathSolution solution) {
|
private void displayShortestPathSolution(ShortestPathSolution solution) {
|
||||||
@ -376,6 +374,7 @@ public class MainWindow extends JFrame {
|
|||||||
public void run() {
|
public void run() {
|
||||||
ShortestPathSolution solution = spAlgorithm.run();
|
ShortestPathSolution solution = spAlgorithm.run();
|
||||||
displayShortestPathSolution(solution);
|
displayShortestPathSolution(solution);
|
||||||
|
spPanel.setEnabled(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,6 @@ public class NodesInputPanel extends JPanel
|
|||||||
public void onDrawingLoaded(Drawing oldDrawing, Drawing newDrawing) {
|
public void onDrawingLoaded(Drawing oldDrawing, Drawing newDrawing) {
|
||||||
if (newDrawing != drawing) {
|
if (newDrawing != drawing) {
|
||||||
this.drawing = newDrawing;
|
this.drawing = newDrawing;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user