From 17f7dd1302e3337df9b04a811b5d45ab102ac02b Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 26 Aug 2008 09:38:43 +0000 Subject: [PATCH] bugfix todo for the 'edit sequence' command --- src/jalview/commands/EditCommand.java | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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]); -- 1.7.10.2