From: amwaterhouse Date: Mon, 5 Feb 2007 11:46:11 +0000 (+0000) Subject: Fixed bug in trim right annotation adjust X-Git-Tag: Release_2_3~378 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fe82331e1b2076c697e3e1da021c97ae30b7cc00;hp=1b1a1007c534a02fdbae76df0c084f215c7c4c21;p=jalview.git Fixed bug in trim right annotation adjust --- diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java index 1f60569..7effdfb 100644 --- a/src/jalview/commands/EditCommand.java +++ b/src/jalview/commands/EditCommand.java @@ -372,7 +372,12 @@ public class EditCommand implements CommandI else { if(command.position 0) + temp = new Annotation[aSize - command.number + command.position]; + else + temp = new Annotation[aSize]; + } else temp = new Annotation[aSize]; } @@ -409,7 +414,7 @@ public class EditCommand implements CommandI } else { - if(command.position < aSize) + if(command.position < aSize && aSize - command.number+command.position>0) { System.arraycopy(annotations[a].annotations, 0, temp, 0, command.position);