{
// Duplicate sequence annotation in all views.
AlignmentI[] alview = this.getViewAlignments();
- for (int avnum=0;avnum<alview.length; avnum++)
+ for (int i = 0; i < sequences.length; i++)
{
- if (alview[avnum]!=alignment)
+ AlignmentAnnotation sann[] = sequences[i].getAnnotation();
+ if (sann == null)
+ continue;
+ for (int avnum = 0; avnum < alview.length; avnum++)
{
- // duplicate in a view other than the one with input focus
- int avwidth = alview[avnum].getWidth()+1;
- for (int i=0; i < sequences.length; i++)
+
+ if (alview[avnum] != alignment)
{
- AlignmentAnnotation sann[] = sequences[i].getAnnotation();
- if (sann==null)
- continue;
+ // duplicate in a view other than the one with input focus
+ int avwidth = alview[avnum].getWidth() + 1;
+
// this relies on sann being preserved after we modify the sequence's annotation array
for (int a=0; a<sann.length; a++)
{
AlignmentAnnotation newann = new AlignmentAnnotation(sann[a]);
+
sequences[i].addAlignmentAnnotation(newann);
newann.padAnnotation(avwidth);
alview[avnum].addAnnotation(newann); // annotation was duplicated earlier