enable mouseover between DNA coding regions and translated peptide location
authorjprocter <Jim Procter>
Sun, 17 Jun 2007 13:06:23 +0000 (13:06 +0000)
committerjprocter <Jim Procter>
Sun, 17 Jun 2007 13:06:23 +0000 (13:06 +0000)
src/jalview/gui/AlignViewport.java

index cbb19fb..eb5ef20 100755 (executable)
@@ -29,6 +29,7 @@ import jalview.bin.*;
 import jalview.datamodel.*;
 
 import jalview.schemes.*;
+import jalview.structure.StructureSelectionManager;
 
 /**
  * DOCUMENT ME!
@@ -916,7 +917,15 @@ public class AlignViewport
      */
     public void setAlignment(AlignmentI align)
     {
+      if (alignment!=null && alignment.getCodonFrames()!=null)
+      {
+        StructureSelectionManager.getStructureSelectionManager().removeMappings(alignment.getCodonFrames());
+      }
         this.alignment = align;
+        if (alignment.getCodonFrames()!=null)
+        {
+          StructureSelectionManager.getStructureSelectionManager().addMappings(alignment.getCodonFrames());
+        }
     }
 
     /**