Fix issue with ProgressBar for loading graphs.

This commit is contained in:
Holt59 2018-03-14 21:30:37 +01:00
parent 25e35b9bc4
commit ec9cd9c601
2 changed files with 9 additions and 11 deletions

View File

@ -1,7 +1,6 @@
package org.insa.graphics; package org.insa.graphics;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension;
import javax.swing.Box; import javax.swing.Box;
import javax.swing.BoxLayout; import javax.swing.BoxLayout;
@ -63,13 +62,8 @@ public class GraphReaderProgressBar extends JDialog implements GraphReaderObserv
} }
pane.add(Box.createVerticalGlue()); pane.add(Box.createVerticalGlue());
pane.setPreferredSize(new Dimension(300, 120));
setContentPane(pane); setContentPane(pane);
pack(); pack();
} }
@Override @Override

View File

@ -592,6 +592,10 @@ public class MainWindow extends JFrame {
return; return;
} }
// In case of....
progressBar.setVisible(false);
progressBar = null;
String info = graph.getMapId(); String info = graph.getMapId();
if (graph.getMapName() != null && !graph.getMapName().isEmpty()) { if (graph.getMapName() != null && !graph.getMapName().isEmpty()) {
// The \u200e character is the left-to-right mark, we need to avoid issue with // The \u200e character is the left-to-right mark, we need to avoid issue with