Alignment editing columns 0 and 1 fixed
[jalview.git] / src / jalview / commands / EditCommand.java
index 1d4880a..d9f51e0 100644 (file)
@@ -378,14 +378,17 @@ public class EditCommand implements CommandI
             if(command.position+command.number>aSize)\r
               tSize = aSize;\r
             else\r
-            tSize = aSize - command.number + command.position;\r
+             {\r
+                tSize = aSize - command.number + command.position;\r
+             }\r
           }\r
           else\r
             tSize = aSize;\r
 \r
           if(tSize<0)\r
+          {\r
             tSize = aSize;\r
-\r
+          }\r
           temp = new Annotation[tSize];\r
 \r
         }\r
@@ -439,7 +442,7 @@ public class EditCommand implements CommandI
         }\r
         else\r
         {\r
-          if(tSize!=aSize)\r
+          if(tSize!=aSize || command.position<2)\r
           {\r
             System.arraycopy(annotations[a].annotations,\r
                              0, temp, 0, command.position);\r