X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fcommands%2FEditCommand.java;h=83e44174ba49be74307137bd15c2349ab57da63d;hb=97acc4fa0742948992abd1f3ca982c6df4eff653;hp=97448e0c38f73ed2046895da678bed845825da74;hpb=4aad2f3624613cfc4d883f40c0470debd8f699b6;p=jalview.git diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java index 97448e0..83e4417 100644 --- a/src/jalview/commands/EditCommand.java +++ b/src/jalview/commands/EditCommand.java @@ -240,6 +240,17 @@ public class EditCommand implements CommandI if(command.string!=null && command.string[i]!=null) { + if(command.position>=tmp.length()) + { + //This occurs if padding is on, and residues + //are removed from end of alignment + int length = command.position-tmp.length(); + while (length > 0) + { + tmp.append(command.gapChar); + length--; + } + } tmp.insert(command.position, command.string[i]); command.string[i] = null; } @@ -279,6 +290,7 @@ public class EditCommand implements CommandI int number, AlignmentI al) { + this.gapChar = al.getGapCharacter(); this.command = command; this.seqs = seqs; this.position = position;