JAL-845 code/refactoring/tests related to linking DNA and protein
[jalview.git] / src / jalview / gui / AlignViewport.java
index f00e4d3..5a9fa6b 100644 (file)
@@ -1329,11 +1329,11 @@ public class AlignViewport extends AlignmentViewport implements
           StructureSelectionManager ssm, VamsasSource source)
   {
     /*
-     * ...work in progress... do nothing unless we are a 'slave' of the source
-     * May replace this with direct calls not via SSM.
+     * ...work in progress... do nothing unless we are a 'complement' of the
+     * source May replace this with direct calls not via SSM.
      */
     if (source instanceof AlignViewportI
-            && ((AlignViewportI) source).getSlave() == this)
+            && ((AlignViewportI) source).getCodingComplement() == this)
     {
       // ok to continue;
     }
@@ -1584,14 +1584,15 @@ public class AlignViewport extends AlignmentViewport implements
               AlignFrame.DEFAULT_HEIGHT);
 
       /*
-       * Set the cDNA to list for edits on the protein.
+       * Set the frames to list for each other's edit and sort commands.
        */
       ssm.addCommandListener(cdnaFrame.getViewport());
+      ssm.addCommandListener(proteinFrame.getViewport());
 
       /*
-       * cDNA is 'slaved' to edits, selection, sorting, show/hide on protein
+       * cDNA view will mirror edits, selection, sorting, show/hide on protein
        */
-      proteinFrame.getViewport().setSlave(cdnaFrame.getViewport());
+      proteinFrame.getViewport().setCodingComplement(cdnaFrame.getViewport());
     }
 
     return true;