From 4dd6f7576368b0ee67087eadabfd82dd91173694 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 19 Apr 2007 15:21:16 +0000 Subject: [PATCH] ensure edit command gapChar is updated and used for padding when no alignmentI reference is available --- src/jalview/commands/EditCommand.java | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java index ccc6a81..4cd5992 100644 --- a/src/jalview/commands/EditCommand.java +++ b/src/jalview/commands/EditCommand.java @@ -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); } } - } -- 1.7.10.2