if (refSeq != null)\r
{\r
annotation.belowAlignment = false;\r
+ // make a copy of refSeq so we can find other matches in the alignment\r
+ SequenceI referedSeq = refSeq;\r
do\r
{\r
// copy before we do any mapping business.\r
// TODO: verify that undo/redo with 1:many sequence associated\r
// annotations can be undone correctly\r
AlignmentAnnotation ann = new AlignmentAnnotation(annotation);\r
- annotation.createSequenceMapping(refSeq, refSeqIndex, false);\r
+ annotation.createSequenceMapping(referedSeq, refSeqIndex, false);\r
annotation.adjustForAlignment();\r
- refSeq.addAlignmentAnnotation(annotation);\r
+ referedSeq.addAlignmentAnnotation(annotation);\r
al.addAnnotation(annotation);\r
al.setAnnotationIndex(annotation,\r
al.getAlignmentAnnotation().length\r
annotation = ann;\r
\r
} while (refSeqId != null\r
- && (refSeq = al.findName(refSeq, refSeqId, true)) != null);\r
+ && (referedSeq = al.findName(referedSeq, refSeqId, true)) != null);\r
}\r
else\r
{\r