From 6bbf32c80d96e3ee32d38b9eb1478cd9dd249734 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 1 May 2007 11:46:38 +0000 Subject: [PATCH] removeAlignmentAnnotation only removes annotation objects referenced by the alignmentI and will do nothing otherwise. --- src/jalview/datamodel/Alignment.java | 21 +++++++++++---------- src/jalview/datamodel/AlignmentI.java | 7 +++++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index abaa80f..536ccab 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) { - if(aa.sequenceRef!=null) - aa.sequenceRef.removeAlignmentAnnotation(aa); - int aSize = 1; if (annotations != null) @@ -485,12 +479,14 @@ public class Alignment AlignmentAnnotation[] temp = new AlignmentAnnotation[aSize - 1]; + boolean swap=false; int tIndex = 0; - for (int i = 0; i < aSize; i++) + for (int i = 0; tIndex