SequenceGroup sg = ap.av.getSelectionGroup();
if (sg!=null)
{
+ // we make a copy rather than edit the current selection if no modifiers pressed
+ // see Enhancement JAL-1557
+ if (!(evt.isControlDown() || evt.isShiftDown()))
+ {
sg = new SequenceGroup(sg);
sg.clear();
sg.addSequence(aa[selectedRow].sequenceRef, false);
+ } else {
+ if (evt.isControlDown())
+ {
+ sg.addOrRemove(aa[selectedRow].sequenceRef, true);
+ } else {
+ // notionally, we should also add intermediate sequences from last added sequence ?
+ sg.addSequence(aa[selectedRow].sequenceRef, true);
+ }
+ }
} else {
sg = new SequenceGroup();
sg.setStartRes(0);
SequenceGroup sg = ap.av.getSelectionGroup();
if (sg!=null)
{
+ // we make a copy rather than edit the current selection if no modifiers pressed
+ // see Enhancement JAL-1557
+ if (!(evt.isControlDown() || evt.isShiftDown()))
+ {
sg = new SequenceGroup(sg);
sg.clear();
sg.addSequence(aa[selectedRow].sequenceRef, false);
+ } else {
+ if (evt.isControlDown())
+ {
+ sg.addOrRemove(aa[selectedRow].sequenceRef, true);
+ } else {
+ // notionally, we should also add intermediate sequences from last added sequence ?
+ sg.addSequence(aa[selectedRow].sequenceRef, true);
+ }
+ }
} else {
sg = new SequenceGroup();
sg.setStartRes(0);