From: amwaterhouse Date: Thu, 26 Oct 2006 09:37:58 +0000 (+0000) Subject: Known bugs fixed X-Git-Tag: Release_2_2~227 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8787ad51b5206692859df9b84e836a01e7a91c02;p=jalview.git Known bugs fixed --- diff --git a/src/jalview/commands/RemoveGapColCommand.java b/src/jalview/commands/RemoveGapColCommand.java index dfcfc47..5bf5b61 100644 --- a/src/jalview/commands/RemoveGapColCommand.java +++ b/src/jalview/commands/RemoveGapColCommand.java @@ -36,7 +36,7 @@ public class RemoveGapColCommand extends EditCommand edits = new Edit[0]; boolean delete = true; - for (int i = start; i <= end; i++) + for (int i = start; i < end; i++) { delete = true; @@ -78,15 +78,9 @@ public class RemoveGapColCommand extends EditCommand { //This is for empty columns at the //end of the alignment - int width = end-endCol; - - if(endCol==-1) - width = end-start+1; - - this.appendEdit(DELETE_GAP, seqs, startCol - deletedCols, - width, + end-startCol+1, gapChar, false); } diff --git a/src/jalview/commands/RemoveGapsCommand.java b/src/jalview/commands/RemoveGapsCommand.java index 9343ec2..ddd6b76 100644 --- a/src/jalview/commands/RemoveGapsCommand.java +++ b/src/jalview/commands/RemoveGapsCommand.java @@ -48,37 +48,44 @@ public class RemoveGapsCommand extends EditCommand int startCol = -1, endCol = -1; int deletedCols = 0; + int j, jSize; + edits = new Edit[0]; boolean delete = true; char [] sequence; + for(int s=0; s -1) { this.appendEdit(DELETE_GAP, new SequenceI[]{seqs[s]}, - startCol - deletedCols, + start + startCol - deletedCols, endCol - startCol, gapChar, false); @@ -90,15 +97,9 @@ public class RemoveGapsCommand extends EditCommand } if (delete && startCol > -1) { - int width = end - endCol; - - if (endCol == -1) - width = end - start + 1; - - //This is the end of the region. this.appendEdit(DELETE_GAP, new SequenceI[]{seqs[s]}, - startCol - deletedCols, - width, + start + startCol - deletedCols, + jSize - startCol, gapChar, false); }