return flag indicating if annotations were actually deleted from alignment
authorjprocter <Jim Procter>
Wed, 2 May 2007 12:20:10 +0000 (12:20 +0000)
committerjprocter <Jim Procter>
Wed, 2 May 2007 12:20:10 +0000 (12:20 +0000)
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/AlignmentI.java

index 536ccab..cec2abc 100755 (executable)
@@ -463,7 +463,7 @@ public class Alignment
   /* (non-Javadoc)
    * @see jalview.datamodel.AlignmentI#deleteAnnotation(jalview.datamodel.AlignmentAnnotation)
    */
-  public void deleteAnnotation(AlignmentAnnotation aa)
+  public boolean deleteAnnotation(AlignmentAnnotation aa)
   {
     int aSize = 1;
 
@@ -474,7 +474,7 @@ public class Alignment
 
     if (aSize < 1)
     {
-      return;
+      return false;
     }
 
     AlignmentAnnotation[] temp = new AlignmentAnnotation[aSize - 1];
@@ -500,6 +500,7 @@ public class Alignment
       if(aa.sequenceRef!=null)
         aa.sequenceRef.removeAlignmentAnnotation(aa);
     }
+    return swap;
   }
 
   /**
index ef1862e..34a5ff2 100755 (executable)
@@ -184,8 +184,9 @@ public interface AlignmentI
    * vector. Otherwise, it will do nothing.
    * 
    * @param aa the annotation to delete
+   * @return true if annotation was deleted from this alignment.
    */
-  public void deleteAnnotation(AlignmentAnnotation aa);
+  public boolean deleteAnnotation(AlignmentAnnotation aa);
 
   /**
    * Get the annotation associated with this alignment