X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentAnnotation.java;h=5a2c46e0b3e2be52032af8a67f02cfbefdde6cfc;hb=d6e1bbede5adc04f34c969213ac6a4c6d9e5d34a;hp=7f6b08acbf38406195da64fb85a973a76b089a28;hpb=aae9a99e127a20cfd7def2ced9265dcf669bf737;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 7f6b08a..5a2c46e 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -168,33 +168,35 @@ public class AlignmentAnnotation } } - if(!drawValues) - { - for (int i = 0; i < annotations.length; i++) - { - if (annotations[i] != null) - annotations[i].displayCharacter = ""; - } - } - graphMin = min; graphMax = max; for (int i = 0; i < annotations.length; i++) { - if ((annotations[i] != null) && - ((annotations[i].secondaryStructure == 'H') || + if (!hasIcons + && annotations[i] != null + && ((annotations[i].secondaryStructure == 'H') || (annotations[i].secondaryStructure == 'E'))) { hasIcons = true; } - if ((annotations[i] != null) && - (annotations[i].displayCharacter.length() > 0)) + if (!hasText + && annotations[i]!=null + && annotations[i].displayCharacter.length() > 0) { hasText = true; } } + + if(!drawValues && graphType!=NO_GRAPH) + { + for (int i = 0; i < annotations.length; i++) + { + if (annotations[i] != null) + annotations[i].displayCharacter = ""; + } + } } /** @@ -299,9 +301,16 @@ public class AlignmentAnnotation { int a=0, aSize = sequenceRef.getLength(); + if(aSize == 0) + { + //Its been deleted + return; + } + int position; Annotation[] temp = new Annotation[aSize]; Integer index; + for (a = sequenceRef.getStart(); a <= sequenceRef.getEnd(); a++) { index = new Integer(a);