remove seqref annotations
[jalview.git] / src / jalview / datamodel / Alignment.java
index d26314e..83d2499 100755 (executable)
@@ -149,7 +149,7 @@ public class Alignment
         // derive new sequence
         SequenceI adding = snew.deriveSequence();
         getDataset().addSequence(adding.getDatasetSequence());
-        snew = adding;        
+        snew = adding;
       }
     }
     if (sequences==null) {
@@ -466,6 +466,9 @@ public class Alignment
    */
   public void deleteAnnotation(AlignmentAnnotation aa)
   {
+    if(aa.sequenceRef!=null)
+      aa.sequenceRef.removeAlignmentAnnotation(aa);
+
     int aSize = 1;
 
     if (annotations != null)