patch v2 for JAL-1474 add the newly recovered dataset sequence to the dataset current...
authorJim Procter <jprocter@dundee.ac.uk>
Tue, 15 Apr 2014 17:43:34 +0000 (18:43 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Mon, 21 Apr 2014 13:09:17 +0000 (14:09 +0100)
src/jalview/gui/Jalview2XML.java

index c7fa090..ce42174 100644 (file)
@@ -3737,6 +3737,20 @@ public class Jalview2XML
         if (sq != dsq)
         { // make this dataset sequence sq's dataset sequence
           sq.setDatasetSequence(dsq);
+          // and update the current dataset alignment
+          if (ds==null) {
+            if (dseqs!=null) {
+              if (!dseqs.contains(dsq))
+              {
+                dseqs.add(dsq);
+              }
+            } else {
+              if (ds.findIndex(dsq)<0)
+              {
+                ds.addSequence(dsq);
+              }
+            }
+          }
         }
       }
     }