From: jprocter Date: Tue, 26 Aug 2008 09:38:43 +0000 (+0000) Subject: bugfix todo for the 'edit sequence' command X-Git-Tag: Release_2_4~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=17f7dd1302e3337df9b04a811b5d45ab102ac02b;p=jalview.git bugfix todo for the 'edit sequence' command --- diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java index 6740b7f..e859e3e 100644 --- a/src/jalview/commands/EditCommand.java +++ b/src/jalview/commands/EditCommand.java @@ -421,10 +421,31 @@ public class EditCommand String oldstring; int start = command.position; int end = command.number; - + // TODO TUTORIAL - Fix for replacement with different length of sequence (or whole sequence) + // TODO Jalview 2.4 bugfix change to an aggregate command - original sequence string is cut, new string is pasted in. command.number = start + command.string[0].length; for (int i = 0; i < command.seqs.length; i++) { + /** cut + * addHistoryItem(new EditCommand("Cut Sequences", + EditCommand.CUT, + cut, + sg.getStartRes(), + sg.getEndRes()-sg.getStartRes()+1, + viewport.alignment)); + + */ + /** then + * addHistoryItem(new EditCommand( + "Add sequences", + EditCommand.PASTE, + sequences, + 0, + alignment.getWidth(), + alignment) + ); + + */ oldstring = command.seqs[i].getSequenceAsString(); tmp = new StringBuffer(oldstring.substring(0, start)); tmp.append(command.string[i]);