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);
}
return;
}
+ stretchGroup.recalcConservation(); // always do this - annotation has own state
if (stretchGroup.cs != null)
{
if (stretchGroup.cs instanceof ClustalxColourScheme)
.getWidth());
}
- if (stretchGroup.cs instanceof Blosum62ColourScheme
- || stretchGroup.cs instanceof PIDColourScheme
- || stretchGroup.cs.conservationApplied()
- || stretchGroup.cs.getThreshold() > 0)
- {
- stretchGroup.recalcConservation();
- }
-
if (stretchGroup.cs.conservationApplied())
{
SliderPanel.setConservationSlider(ap, stretchGroup.cs, stretchGroup
SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup
.getName());
}
- PaintRefresher.Refresh(this, av.getSequenceSetId());
- ap.paintAlignment(true);
}
+ PaintRefresher.Refresh(this, av.getSequenceSetId());
+ ap.paintAlignment(true);
changeEndRes = false;
changeStartRes = false;
{
// 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");