{
return;
}
- if (seqsel != null && seqsel.getSize() > 0)
+
+ RnaModel rnaModel = models.get(rna);
+
+ if (seqsel != null && seqsel.getSize() > 0
+ && seqsel.contains(rnaModel.seq))
{
int start = seqsel.getStartRes(), end = seqsel.getEndRes();
- ShiftList shift = offsets.get(rna);
- if (shift != null)
+ if (rnaModel.gapped)
+ {
+ ShiftList shift = offsets.get(rna);
+ if (shift != null)
+ {
+ start = shift.shift(start);
+ end = shift.shift(end);
+ }
+ }
+ else
{
- start = shift.shift(start);
- end = shift.shift(end);
+ start = rnaModel.seq.findPosition(start) - rnaModel.seq.getStart();
+ end = rnaModel.seq.findPosition(end) - rnaModel.seq.getStart();
}
+
selectionHighlighter.highlightRegion(rna, start, end);
selectionHighlighter.getLastHighlight()
.setOutlineColor(seqsel.getOutlineColour());