From: amwaterhouse Date: Thu, 16 Jun 2005 09:34:31 +0000 (+0000) Subject: remove gaps applies to selected area X-Git-Tag: Release_2_0~19 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0cc0607495a69fc52505ae2d306bfbf9137d54aa;p=jalview.git remove gaps applies to selected area --- diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index b314854..bb4b58a 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -544,16 +544,32 @@ public class AlignFrame public void removeAllGapsMenuItem_actionPerformed(ActionEvent e) { - addHistoryItem(new HistoryItem("Remove Gaps", - viewport.alignment, + addHistoryItem(new HistoryItem("Remove Gaps", viewport.alignment, HistoryItem.HIDE)); + SequenceI current; int jSize; - for (int i = 0; i < viewport.getAlignment().getSequences().size(); i++) + + Vector seqs=null; + + int start=0, end = viewport.alignment.getWidth(); + + if(viewport.getSelectionGroup()!=null) { - current = viewport.getAlignment().getSequenceAt(i); + seqs = viewport.getSelectionGroup().sequences; + start = viewport.getSelectionGroup().getStartRes(); + end = viewport.getSelectionGroup().getEndRes(); + } + else + seqs = viewport.alignment.getSequences(); + + for (int i = 0; i