Merge branch 'Jalview-BH/JAL-3026' of https://source.jalview.org/git/jalview.git...
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 22 Jun 2018 13:49:22 +0000 (14:49 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 22 Jun 2018 13:49:22 +0000 (14:49 +0100)
src/jalview/bin/JalviewJS.java

index a26e182..3fff67d 100644 (file)
@@ -3,6 +3,7 @@ package jalview.bin;
 import jalview.analysis.AlignmentUtils;
 import jalview.datamodel.AlignmentI;
 import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
 import jalview.gui.SplitFrame;
 import jalview.io.DataSourceType;
 import jalview.io.FileFormatException;
@@ -200,6 +201,7 @@ public class JalviewJS
     /*
      * convert to SplitFrame if a valid file2 is supplied
      */
+    int height = AlignFrame.DEFAULT_HEIGHT;
     AlignFrame alignFrame2 = createAlignFrame(PARAM_FILE2);
     if (alignFrame2 != null)
     {
@@ -207,6 +209,7 @@ public class JalviewJS
       if (splitFrame != null)
       {
         internalFrame = splitFrame;
+        height *= 2;
       }
     }
 
@@ -219,10 +222,10 @@ public class JalviewJS
 
     // fudge so that dialogs can be opened with this frame as parent
     // todo JAL-3031 also override Desktop.addInternalFrame etc
-    // Desktop.parent = frame.getContentPane();
+    Desktop.parent = frame.getContentPane();
 
     frame.pack();
-    frame.setSize(AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
+    frame.setSize(AlignFrame.DEFAULT_WIDTH, height);
     frame.setVisible(true);
   }