From f7209385ed929337d8a4259981700f2bd7a8bbba Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 10 Oct 2006 14:11:53 +0000 Subject: [PATCH] No need to find index when deleting --- src/jalview/gui/AlignFrame.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 27503f9..fe6f4cf 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -1292,8 +1292,6 @@ public class AlignFrame for (int i = 0; i < sg.getSize(false); i++) { SequenceI seq = sg.getSequenceAt(i); - int index = viewport.getAlignment().findIndex(seq); - seq.deleteChars(sg.getStartRes(), sg.getEndRes() + 1); // If the cut affects all sequences, remove highlighted columns @@ -1308,10 +1306,6 @@ public class AlignFrame viewport.getAlignment().deleteSequence(seq); PaintRefresher.Refresh(alignPanel,alignPanel.av.getSequenceSetId(),seq,null); } - else - { - viewport.getAlignment().getSequences().setElementAt(seq, index); - } } viewport.setSelectionGroup(null); @@ -2759,7 +2753,7 @@ public class AlignFrame return ShowNewickTree(nf, title, null, w, h, x, y); } /** - * Add a treeviewer for the tree extracted from a newick file object to the current alignment view + * Add a treeviewer for the tree extracted from a newick file object to the current alignment view * * @param nf the tree * @param title tree viewer title @@ -3224,4 +3218,4 @@ public void drop(DropTargetDropEvent evt) { return viewport; } -} \ No newline at end of file +} -- 1.7.10.2