JAL-1684 align added alignment to match original in split frame
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 14 Sep 2015 08:34:05 +0000 (09:34 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 14 Sep 2015 08:34:05 +0000 (09:34 +0100)
src/jalview/appletgui/CutAndPasteTransfer.java

index 5617c64..4590c54 100644 (file)
@@ -304,7 +304,7 @@ public class CutAndPasteTransfer extends Panel implements ActionListener,
     }
     AlignmentI protein = thisAlignment.isNucleotide() ? al : thisAlignment;
     AlignmentI dna = thisAlignment.isNucleotide() ? thisAlignment : al;
-    boolean mapped = AlignmentUtils.mapProteinToCdna(protein, dna);
+    boolean mapped = AlignmentUtils.mapProteinAlignmentToCdna(protein, dna);
     if (!mapped)
     {
       return false;
@@ -332,6 +332,11 @@ public class CutAndPasteTransfer extends Panel implements ActionListener,
     }
 
     /*
+     * 'align' the added alignment to match the current one
+     */
+    al.alignAs(thisAlignment);
+
+    /*
      * Open SplitFrame with DNA above and protein below, including the alignment
      * from textbox and a copy of the original.
      */