JAL-1815 restore split frame geometry correctly including position
[jalview.git] / src / jalview / gui / Desktop.java
index 270805a..d03e3f2 100644 (file)
@@ -2933,7 +2933,11 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   }
 
   /**
-   * Explode the views in the given frame into separate AlignFrame windows.
+   * Explode the views in the given SplitFrame into separate SplitFrame windows.
+   * This respects (remembers) any previous 'exploded geometry' i.e. the size
+   * and location last time the view was expanded (if any). However it does not
+   * remember the split pane divider location - this is set to match the
+   * 'exploding' frame.
    * 
    * @param sf
    */
@@ -2965,13 +2969,11 @@ public class Desktop extends jalview.jbgui.GDesktop implements
        */
       AlignmentPanel topPanel = (AlignmentPanel) topPanels.get(i);
       AlignFrame newTopFrame = new AlignFrame(topPanel);
-      newTopFrame.setSize(new Dimension(AlignFrame.DEFAULT_WIDTH,
-              AlignFrame.DEFAULT_HEIGHT));
+      newTopFrame.setSize(oldTopFrame.getSize());
       newTopFrame.setVisible(true);
       AlignmentPanel bottomPanel = (AlignmentPanel) bottomPanels.get(i);
       AlignFrame newBottomFrame = new AlignFrame(bottomPanel);
-      newBottomFrame.setSize(new Dimension(AlignFrame.DEFAULT_WIDTH,
-              AlignFrame.DEFAULT_HEIGHT));
+      newBottomFrame.setSize(oldBottomFrame.getSize());
       newBottomFrame.setVisible(true);
       topPanel.av.setGatherViewsHere(false);
       bottomPanel.av.setGatherViewsHere(false);