JAL-1824 corrected copy'n'paste error introduced from JAL-1821 refactor which causes...
[jalview.git] / src / jalview / gui / AlignViewport.java
index fc889ad..c18c989 100644 (file)
@@ -799,7 +799,7 @@ public class AlignViewport extends AlignmentViewport implements
      * If any cDNA/protein mappings can be made between the alignments, offer to
      * open a linked alignment with split frame option.
      */
-    if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, false))
+    if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
     {
       if (AlignmentUtils.isMappable(al, getAlignment()))
       {
@@ -909,6 +909,7 @@ public class AlignViewport extends AlignmentViewport implements
 
     if (openSplitPane)
     {
+      al.alignAs(thisAlignment);
       protein = openSplitFrame(newAlignFrame, thisAlignment,
               protein.getCodonFrames());
     }
@@ -1027,13 +1028,13 @@ public class AlignViewport extends AlignmentViewport implements
      * is found, the result will be empty.
      */
     SearchResults sr = new SearchResults();
-    int seqOffset = findComplementScrollTarget(sr);
+    int verticalOffset = findComplementScrollTarget(sr);
     if (!sr.isEmpty())
     {
       // TODO would like next line without cast but needs more refactoring...
       final AlignmentPanel complementPanel = ((AlignViewport) getCodingComplement()).getAlignPanel();
       complementPanel.setFollowingComplementScroll(true);
-      complementPanel.scrollToCentre(sr, seqOffset);
+      complementPanel.scrollToCentre(sr, verticalOffset);
     }
   }