JAL-2032 structure follow mouseover in a copy of a mapped sequence
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 24 Mar 2016 10:50:48 +0000 (10:50 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 24 Mar 2016 10:50:48 +0000 (10:50 +0000)
src/jalview/structure/StructureSelectionManager.java
src/jalview/structures/models/AAStructureBindingModel.java

index 6bb04ab..28fc3d1 100644 (file)
@@ -880,7 +880,10 @@ public class StructureSelectionManager
     List<AtomSpec> atoms = new ArrayList<AtomSpec>();
     for (StructureMapping sm : mappings)
     {
-      if (sm.sequence == seq || sm.sequence == seq.getDatasetSequence())
+      if (sm.sequence == seq
+              || sm.sequence == seq.getDatasetSequence()
+              || (sm.sequence.getDatasetSequence() != null && sm.sequence
+                      .getDatasetSequence() == seq.getDatasetSequence()))
       {
         for (int index : positions)
         {
index 2ed59ae..42fbfa9 100644 (file)
@@ -633,7 +633,10 @@ public abstract class AAStructureBindingModel extends
         {
           for (SequenceI s : seqs)
           {
-            if (s == seq)
+            if (s == seq
+                    || (s.getDatasetSequence() != null && s
+                            .getDatasetSequence() == seq
+                            .getDatasetSequence()))
             {
               return true;
             }