public void mouseClicked(MouseEvent evt)
{
+ SequenceGroup sg=null;
SequenceI sequence = av.alignment.getSequenceAt(findSeq(evt));
if (evt.getClickCount() > 1)
{
- if (av.getSelectionGroup().getSize() == 1
- && av.getSelectionGroup().getEndRes()
- - av.getSelectionGroup().getStartRes() < 2)
+ sg = av.getSelectionGroup();
+ if (sg!=null && sg.getSize() == 1
+ && sg.getEndRes()
+ - sg.getStartRes() < 2)
{
av.setSelectionGroup(null);
}
{
// TODO: fix this hack - source of messages is align viewport, but SeqPanel
// handles selection messages...
- if (av == source)
+ // TODO: extend config options to allow user to control if selections may be shared between viewports.
+ if (av == source || !av.followSelection || (source instanceof AlignViewport && ((AlignViewport)source).getSequenceSetId().equals(av.getSequenceSetId())))
{
return;
}
// do we want to thread this ? (contention with seqsel and colsel locks, I
// suspect)
boolean repaint = false;
- if (av.followSelection)
- {
- if (av.selectionGroup == null || !av.isSelectionGroupChanged())
+ if (av.selectionGroup == null || !av.isSelectionGroupChanged())
{
SequenceGroup sgroup = null;
if (seqsel != null)
}
repaint |= av.isColSelChanged();
}
- }
if (av.hasHiddenColumns && (av.colSel==null || av.colSel.getHiddenColumns()==null))
{
System.err.println("Bad things");