allow an alignment annotation row to be removed and re-inserted without losing any...
[jalview.git] / src / jalview / datamodel / Alignment.java
index 42559c6..4e279d3 100755 (executable)
@@ -652,6 +652,11 @@ public class Alignment implements AlignmentI
    */
   public boolean deleteAnnotation(AlignmentAnnotation aa)
   {
+    return deleteAnnotation(aa, true);
+  }
+  
+  public boolean deleteAnnotation(AlignmentAnnotation aa, boolean unhook)
+  {
     int aSize = 1;
 
     if (annotations != null)
@@ -683,7 +688,9 @@ public class Alignment implements AlignmentI
     if (swap)
     {
       annotations = temp;
-      unhookAnnotation(aa);
+      if (unhook) {
+        unhookAnnotation(aa);
+      }
     }
     return swap;
   }