From dc74f4ac53cb25b16760263aead95a24ed8f33cd Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 23 Apr 2015 09:21:53 +0100 Subject: [PATCH] JAL-845 set split frame divider safely for eXpand Views --- src/jalview/jbgui/GSplitFrame.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index a377571..bcd5f64 100644 --- a/src/jalview/jbgui/GSplitFrame.java +++ b/src/jalview/jbgui/GSplitFrame.java @@ -45,7 +45,8 @@ public class GSplitFrame extends JInternalFrame splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topFrame, bottomFrame); splitPane.setVisible(true); - final double ratio = topFrame.getHeight() + final double ratio = bottomFrame.getHeight() == 0 ? 0.5d : topFrame + .getHeight() / (double) (topFrame.getHeight() + bottomFrame.getHeight()); splitPane.setDividerLocation(ratio); splitPane.setResizeWeight(ratio); -- 1.7.10.2