JAL-1824 updated caching procedure for pdb entries. Also refactored getPDBEntry metho...
[jalview.git] / src / jalview / gui / SplitFrame.java
index bfb3719..a665f5c 100644 (file)
@@ -65,8 +65,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
     // about 50 pixels for the SplitFrame's title bar etc
     int height = ((AlignFrame) getTopFrame()).getHeight()
             + ((AlignFrame) getBottomFrame()).getHeight() + 50;
-    height = Math.min(height, Desktop.instance.getHeight() - 20);
-    // setSize(AlignFrame.DEFAULT_WIDTH, Desktop.instance.getHeight() - 20);
+    // about 65 pixels for Desktop decorators on Windows
+    height = Math.min(height, Desktop.instance.getHeight() - 65);
     setSize(width, height);
 
     adjustLayout();
@@ -392,6 +392,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
   {
     AlignFrame topFrame = (AlignFrame) getTopFrame();
     AlignFrame bottomFrame = (AlignFrame) getBottomFrame();
+    final boolean scaleProteinAsCdna = topFrame.viewport
+            .isScaleProteinAsCdna();
 
     AlignmentPanel newTopPanel = topFrame.newView(null, true);
     AlignmentPanel newBottomPanel = bottomFrame.newView(null, true);
@@ -410,6 +412,19 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
     newBottomPanel.av.viewName = newTopPanel.av.viewName;
     newTopPanel.av.setCodingComplement(newBottomPanel.av);
 
+    /*
+     * These lines can be removed once scaleProteinAsCdna is added to element
+     * Viewport in jalview.xsd, as Jalview2XML.copyAlignPanel will then take
+     * care of it
+     */
+    newTopPanel.av.setScaleProteinAsCdna(scaleProteinAsCdna);
+    newBottomPanel.av.setScaleProteinAsCdna(scaleProteinAsCdna);
+
+    /*
+     * Line up id labels etc
+     */
+    adjustLayout();
+
     final StructureSelectionManager ssm = StructureSelectionManager
             .getStructureSelectionManager(Desktop.instance);
     ssm.addCommandListener(newTopPanel.av);