Annotation adjustment moved to EditCommand
[jalview.git] / src / jalview / commands / RemoveGapsCommand.java
index ba39381..f6413a7 100644 (file)
@@ -23,7 +23,7 @@ import jalview.datamodel.*;
 public class RemoveGapsCommand  extends EditCommand\r
 {\r
   public RemoveGapsCommand(  String description,\r
-                             SequenceI[] seqs, char gapChar)\r
+                             SequenceI[] seqs, AlignmentI al)\r
   {\r
     this.description = description;\r
     int width = 0;\r
@@ -31,18 +31,18 @@ public class RemoveGapsCommand  extends EditCommand
       if(seqs[i].getLength()>width)\r
         width = seqs[i].getLength();\r
 \r
-    findGaps(seqs, 0, width, gapChar);\r
+    findGaps(seqs, 0, width, al);\r
   }\r
 \r
   public RemoveGapsCommand(  String description,\r
                              SequenceI[] seqs,\r
-                             int start, int end, char gapChar)\r
+                             int start, int end, AlignmentI al)\r
   {\r
     this.description = description;\r
-    findGaps(seqs, start, end, gapChar);\r
+    findGaps(seqs, start, end, al);\r
   }\r
 \r
-  void findGaps(SequenceI [] seqs, int start, int end, char gapChar)\r
+  void findGaps(SequenceI [] seqs, int start, int end, AlignmentI al)\r
   {\r
 \r
     int startCol = -1, endCol = -1;\r
@@ -87,7 +87,7 @@ public class RemoveGapsCommand  extends EditCommand
           this.appendEdit(DELETE_GAP, new SequenceI[]{seqs[s]},\r
                           start + startCol - deletedCols,\r
                           endCol - startCol,\r
-                          gapChar,\r
+                          al,\r
                           false);\r
 \r
           deletedCols += (endCol - startCol);\r
@@ -100,7 +100,7 @@ public class RemoveGapsCommand  extends EditCommand
         this.appendEdit(DELETE_GAP, new SequenceI[]{seqs[s]},\r
                         start + startCol - deletedCols,\r
                         jSize - startCol,\r
-                        gapChar,\r
+                        al,\r
                         false);\r
       }\r
 \r