Fix issue that was shrinking the drawing when redrawing.
This commit is contained in:
parent
0236798ef5
commit
5ccdbc9417
@ -222,7 +222,7 @@ public class MainWindow extends JFrame {
|
||||
}
|
||||
|
||||
private void updateDrawing(Class<? extends Drawing> newClass) {
|
||||
|
||||
int oldLocation = mainPanel.getDividerLocation();
|
||||
drawing.clear();
|
||||
if (drawing == null || !newClass.isInstance(drawing)) {
|
||||
try {
|
||||
@ -232,8 +232,9 @@ public class MainWindow extends JFrame {
|
||||
e.printStackTrace();
|
||||
}
|
||||
addDrawingClickListeners();
|
||||
mainPanel.setLeftComponent((Component) drawing);
|
||||
mainPanel.setDividerLocation(oldLocation);
|
||||
}
|
||||
mainPanel.setLeftComponent((Component) drawing);
|
||||
}
|
||||
|
||||
private JMenuBar createMenuBar() {
|
||||
|
Loading…
Reference in New Issue
Block a user