X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fcommands%2FEditCommand.java;h=ce881273d13d79100884ba4e42ca30257a1b2707;hb=855f7a4bb3e8d5fcfa9059df64262fc73f0164be;hp=ccc6a813692e1f32113b6ed01af246b1b591b758;hpb=04c49245650f804b89b88b6818fd8add2ef9343e;p=jalview.git diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java index ccc6a81..ce88127 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) @@ -471,7 +472,11 @@ public class EditCommand } int tSize = 0; - + if (annotations[a].annotations == null) + { + // nothing to edit here ? + continue; + } aSize = annotations[a].annotations.length; if (insert) { @@ -480,7 +485,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 +765,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 +775,4 @@ public class EditCommand fullAlignmentHeight = (al.getHeight() == seqs.length); } } - }