From: jprocter Date: Wed, 2 May 2007 12:20:10 +0000 (+0000) Subject: return flag indicating if annotations were actually deleted from alignment X-Git-Tag: Release_2_3~84 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=77b038f418aea84563953ad94f839592317ea500;p=jalview.git return flag indicating if annotations were actually deleted from alignment --- diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 536ccab..cec2abc 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -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; } /** diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index ef1862e..34a5ff2 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -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