tIndex prevented deletion of last annotation
authoramwaterhouse <Andrew Waterhouse>
Mon, 7 May 2007 13:57:40 +0000 (13:57 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 7 May 2007 13:57:40 +0000 (13:57 +0000)
src/jalview/datamodel/Alignment.java

index cec2abc..9c7f2fb 100755 (executable)
@@ -482,7 +482,7 @@ public class Alignment
     boolean swap=false;
     int tIndex = 0;
 
-    for (int i = 0; tIndex<temp.length && i < aSize; i++)
+    for (int i = 0; i < aSize; i++)
     {
       if (annotations[i] == aa)
       {
@@ -490,8 +490,7 @@ public class Alignment
         continue;
       }
 
-      temp[tIndex] = annotations[i];
-      tIndex++;
+      temp[tIndex++] = annotations[i];
     }
 
     if (swap)