public void highlightSequence(SearchResults results)
{
- seqCanvas.highlightSearchResults(results);
if (av.followHighlight)
{
- ap.scrollToPosition(results);
+ if (ap.scrollToPosition(results, false))
+ {
+ // ap.invalidate();
+ }
}
+ seqCanvas.highlightSearchResults(results);
+
}
public void updateColours(SequenceI seq, int index)
}
}
}
+
/**
* modify current selection according to a received message.
*/
// handles selection messages...
// TODO: extend config options to allow user to control if selections may be
// shared between viewports.
- if (av!=null && (av == source
- || !av.followSelection
- || (source instanceof AlignViewport && ((AlignViewport) source)
+ if (av != null
+ && (av == source || !av.followSelection || (source instanceof AlignViewport && ((AlignViewport) source)
.getSequenceSetId().equals(av.getSequenceSetId()))))
{
return;
if (av.selectionGroup == null || !av.isSelectionGroupChanged())
{
SequenceGroup sgroup = null;
- if (seqsel != null)
+ if (seqsel != null && seqsel.getSize()>0)
{
if (av.alignment == null)
{
- System.out.println("Selection message: alignviewport av SeqSetId="
- + av.getSequenceSetId() + " ViewId=" + av.getViewId()
- + " 's alignment is NULL! returning immediatly.");
+ System.out
+ .println("Selection message: alignviewport av SeqSetId="
+ + av.getSequenceSetId() + " ViewId="
+ + av.getViewId()
+ + " 's alignment is NULL! returning immediatly.");
return;
}
sgroup = seqsel.intersect(av.alignment,
}
if (repaint)
{
- // probably finessing with multiple redraws here
- PaintRefresher.Refresh(this, av.getSequenceSetId());
- // ap.paintAlignment(false);
+ ap.repaint();
+ //ap.paintAlignment(false);
}
}