{
return;
}
-
- stretchGroup.recalcConservation(); // always do this - annotation has own
- // state
+ // always do this - annotation has own state
+ // but defer colourscheme update until hidden sequences are passed in
+ boolean vischange = stretchGroup.recalcConservation(true);
+ // here we rely on stretchGroup == av.getSelection()
+ needOverviewUpdate |= vischange && av.isSelectionDefinedGroup();
if (stretchGroup.cs != null)
{
stretchGroup.cs.alignmentChanged(stretchGroup,
}
PaintRefresher.Refresh(ap, av.getSequenceSetId());
ap.paintAlignment(needOverviewUpdate);
+ needOverviewUpdate = false;
changeEndRes = false;
changeStartRes = false;
stretchGroup = null;
if (res > (stretchGroup.getStartRes() - 1))
{
stretchGroup.setEndRes(res);
+ needOverviewUpdate |= av.isSelectionDefinedGroup();
}
}
else if (changeStartRes)
if (res < (stretchGroup.getEndRes() + 1))
{
stretchGroup.setStartRes(res);
+ needOverviewUpdate |= av.isSelectionDefinedGroup();
}
}
if (stretchGroup.getSequences(null).contains(nextSeq))
{
stretchGroup.deleteSequence(seq, false);
+ needOverviewUpdate |= av.isSelectionDefinedGroup();
}
else
{
}
stretchGroup.addSequence(nextSeq, false);
+ needOverviewUpdate |= av.isSelectionDefinedGroup();
}
}
// do we want to thread this ? (contention with seqsel and colsel locks, I
// suspect)
- // rules are: colsel is copied if there is a real intersection between
- // sequence selection
- boolean repaint = false, copycolsel = true;
+ /*
+ * only copy colsel if there is a real intersection between
+ * sequence selection and this panel's alignment
+ */
+ boolean repaint = false;
+ boolean copycolsel = false;
if (av.getSelectionGroup() == null || !av.isSelectionGroupChanged(true))
{
SequenceGroup sgroup = null;
}
sgroup = seqsel.intersect(av.getAlignment(),
(av.hasHiddenRows()) ? av.getHiddenRepSequences() : null);
- if ((sgroup == null || sgroup.getSize() == 0)
- && (colsel == null || colsel.isEmpty()))
+ if ((sgroup != null && sgroup.getSize() > 0))
{
- // don't copy columns if the region didn't intersect.
- copycolsel = false;
+ copycolsel = true;
}
}
if (sgroup != null && sgroup.getSize() > 0)
ColumnSelection cs = MappingUtils.mapColumnSelection(colsel, sourceAv,
av);
av.setColumnSelection(cs);
- av.isColSelChanged(true);
ap.scalePanelHolder.repaint();
ap.repaint();