JAL-2210 resolve todo - addDBRef adds to dataset sequence. test needed
authorJim Procter <jprocter@issues.jalview.org>
Tue, 27 Sep 2016 14:14:56 +0000 (15:14 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 27 Sep 2016 14:14:56 +0000 (15:14 +0100)
src/jalview/datamodel/Sequence.java

index 44522a8..d4290a3 100755 (executable)
@@ -961,7 +961,12 @@ public class Sequence extends ASequence implements SequenceI
   @Override
   public void addDBRef(DBRefEntry entry)
   {
-    // TODO add to dataset sequence instead if there is one?
+    if (datasetSequence != null)
+    {
+      datasetSequence.addDBRef(entry);
+      return;
+    }
+
     if (dbrefs == null)
     {
       dbrefs = new DBRefEntry[0];