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
|
||||
private StreamCapturer logStream;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private PrintStream printStream;
|
||||
|
||||
// Current running thread
|
||||
@ -142,6 +141,8 @@ public class MainWindow extends JFrame {
|
||||
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||
setLayout(new BorderLayout());
|
||||
|
||||
setMinimumSize(new Dimension(800, 600));
|
||||
|
||||
// Create drawing and action listeners...
|
||||
this.basicDrawing = new BasicDrawing();
|
||||
this.mapViewDrawing = new MapViewDrawing();
|
||||
@ -272,9 +273,6 @@ public class MainWindow extends JFrame {
|
||||
threadTimer.stop();
|
||||
threadPanel.setVisible(false);
|
||||
currentThread.setThread(null);
|
||||
if (spPanel != null) {
|
||||
spPanel.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void displayShortestPathSolution(ShortestPathSolution solution) {
|
||||
@ -376,6 +374,7 @@ public class MainWindow extends JFrame {
|
||||
public void run() {
|
||||
ShortestPathSolution solution = spAlgorithm.run();
|
||||
displayShortestPathSolution(solution);
|
||||
spPanel.setEnabled(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -337,7 +337,6 @@ public class NodesInputPanel extends JPanel
|
||||
public void onDrawingLoaded(Drawing oldDrawing, Drawing newDrawing) {
|
||||
if (newDrawing != drawing) {
|
||||
this.drawing = newDrawing;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user