ensure edit command gapChar is updated and used for padding when no alignmentI refere...
authorjprocter <Jim Procter>
Thu, 19 Apr 2007 15:21:16 +0000 (15:21 +0000)
committerjprocter <Jim Procter>
Thu, 19 Apr 2007 15:21:16 +0000 (15:21 +0000)
src/jalview/commands/EditCommand.java

index ccc6a81..4cd5992 100644 (file)
@@ -151,16 +151,16 @@ public class EditCommand
       switch(edits[e].command)
       {
         case INSERT_GAP:
-          insertGap(edits[e]);
+        insertGap(edits[e]);
           break;
         case DELETE_GAP:
-          deleteGap(edits[e]);
+        deleteGap(edits[e]);
           break;
         case CUT:
-          cut(edits[e]);
+        cut(edits[e]);
           break;
         case PASTE:
-          paste(edits[e]);
+        paste(edits[e]);
           break;
         case REPLACE:
           replace(edits[e]);
@@ -182,16 +182,16 @@ public class EditCommand
       switch (edits[e].command)
       {
         case INSERT_GAP:
-          deleteGap(edits[e]);
+        deleteGap(edits[e]);
           break;
         case DELETE_GAP:
-          insertGap(edits[e]);
+        insertGap(edits[e]);
           break;
         case CUT:
-          paste(edits[e]);
+        paste(edits[e]);
           break;
         case PASTE:
-          cut(edits[e]);
+        cut(edits[e]);
           break;
         case REPLACE:
           replace(edits[e]);
@@ -373,6 +373,7 @@ public class EditCommand
 
   final void adjustAnnotations(Edit command, boolean insert, boolean modifyVisibility)
   {
+
     AlignmentAnnotation[] annotations = null;
 
     if (modifyVisibility && !insert)
@@ -480,7 +481,7 @@ public class EditCommand
           for (int aa = 0; aa < temp.length; aa++)
           {
             temp[aa] = new Annotation(
-                command.al.getGapCharacter()+"",
+                command.gapChar+"",
                 null, ' ', 0);
           }
       }
@@ -760,6 +761,7 @@ public class EditCommand
       this.position = position;
       this.number = number;
       this.al = al;
+      this.gapChar = al.getGapCharacter();
       string = new char[seqs.length][];
       for (int i = 0; i < seqs.length; i++)
       {
@@ -769,5 +771,4 @@ public class EditCommand
       fullAlignmentHeight = (al.getHeight() == seqs.length);
     }
   }
-
 }