From 2377b4763c9bfecb0527e37be59392df61f8b75e Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 19 Nov 2004 17:23:16 +0000 Subject: [PATCH] if sequence is in selection when removed, remove from av.selection --- src/jalview/gui/GroupEditor.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/GroupEditor.java b/src/jalview/gui/GroupEditor.java index 3c58df3..e9ef492 100755 --- a/src/jalview/gui/GroupEditor.java +++ b/src/jalview/gui/GroupEditor.java @@ -257,7 +257,9 @@ public class GroupEditor extends GGroupEditor { unassignedVector.addElement(assignedVector.elementAt(indices[i]-i)); - sg.deleteSequence( (SequenceI)sequenceHash.get( assignedVector.elementAt(indices[i]-i) )); + SequenceI removeSequence = (SequenceI)sequenceHash.get( assignedVector.elementAt(indices[i]-i) ); + av.getSelection().removeElement( removeSequence ); + sg.deleteSequence( removeSequence ); assignedVector.removeElementAt(indices[i]-i); } @@ -276,7 +278,9 @@ public class GroupEditor extends GGroupEditor { String id = (String)enum.nextElement(); unassignedVector.addElement( id ); - sg.deleteSequence( (SequenceI)sequenceHash.get( id )); + SequenceI removeSequence = (SequenceI)sequenceHash.get( id ); + av.getSelection().removeElement( removeSequence ); + sg.deleteSequence( removeSequence ); } assignedVector.clear(); -- 1.7.10.2