X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignment.java;h=b3a5266dd6981c480ead55a3dc93e34916f59717;hb=349ef01fe53c28dc78bec2d321f9c833a4b6e023;hp=abaa80ffa48f40868d3d026503d00bab2b556d51;hpb=a0b666f6b2b220b28baf6022a41ecf3c50db7d0c;p=jalview.git diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index abaa80f..b3a5266 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -460,17 +460,11 @@ public class Alignment return true; } - - /** - * DOCUMENT ME! - * - * @param aa DOCUMENT ME! + /* (non-Javadoc) + * @see jalview.datamodel.AlignmentI#deleteAnnotation(jalview.datamodel.AlignmentAnnotation) */ - public void deleteAnnotation(AlignmentAnnotation aa) + public boolean deleteAnnotation(AlignmentAnnotation aa) { - if(aa.sequenceRef!=null) - aa.sequenceRef.removeAlignmentAnnotation(aa); - int aSize = 1; if (annotations != null) @@ -480,25 +474,32 @@ public class Alignment if (aSize < 1) { - return; + return false; } AlignmentAnnotation[] temp = new AlignmentAnnotation[aSize - 1]; + boolean swap=false; int tIndex = 0; for (int i = 0; i < aSize; i++) { if (annotations[i] == aa) { + swap=true; continue; } - - temp[tIndex] = annotations[i]; - tIndex++; + if (tIndex