X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentAnnotation.java;fp=src%2Fjalview%2Fdatamodel%2FAlignmentAnnotation.java;h=52779f71c52e3c5dd6c50b72ef43ab1899e7f462;hb=d1f61dfcb459e538da2d2265f2dff9abf3ccf400;hp=a7e635fa3ff6cad1cae78d04edd46c4ce3c507e1;hpb=0cd071bd37b6833f59a0170ca0f9f8192905d404;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index a7e635f..52779f7 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -502,9 +502,13 @@ public class AlignmentAnnotation public char charAt(int index) { return ((index + offset < 0) || (index + offset) >= max - || annotations[index + offset] == null || (annotations[index - + offset].secondaryStructure <= ' ') ? ' ' - : annotations[index + offset].displayCharacter.charAt(0)); + || annotations[index + offset] == null + || (annotations[index + offset].secondaryStructure <= ' ') ? ' ' + : annotations[index + offset].displayCharacter == null + || annotations[index + offset].displayCharacter + .length() == 0 ? annotations[index + offset].secondaryStructure + : annotations[index + offset].displayCharacter + .charAt(0)); } @Override @@ -516,7 +520,9 @@ public class AlignmentAnnotation for (int i = offset; i < mx; i++) { string[i] = (annotations[i] == null || (annotations[i].secondaryStructure <= 32)) ? ' ' - : annotations[i].displayCharacter.charAt(0); + : (annotations[i].displayCharacter == null + || annotations[i].displayCharacter.length() == 0 ? annotations[i].secondaryStructure + : annotations[i].displayCharacter.charAt(0)); } return new String(string); }