Fix issue with drawing not being drawn when opening from central button.

This commit is contained in:
Mikael Capelle 2018-03-12 11:26:16 +01:00
parent fa7c65a6e6
commit 990b74bf1a

View File

@ -465,6 +465,9 @@ public class MainWindow extends JFrame {
if (!(mainPanel.getLeftComponent() instanceof Drawing)) {
mainPanel.setLeftComponent((Component) this.drawing);
mainPanel.setDividerLocation(oldLocation);
// Need to re-validate or the drawing will not have the
// correct size prior to drawing, which can cause issue.
this.revalidate();
}
boolean isNewGraph = newClass == null;
@ -510,6 +513,7 @@ public class MainWindow extends JFrame {
notifyDrawingLoaded(basicDrawing, mapViewDrawing);
drawing.clear();
isNewGraph = true;
mainPanel.revalidate();
}
if (isNewGraph) {
drawing.clear();