patch for bug #36198 - more to follow on Monday.
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index a3328b3..a821066 100755 (executable)
@@ -179,7 +179,7 @@ public class AlignmentAnnotation
       if (annotations[i].secondaryStructure == 'H'
               || annotations[i].secondaryStructure == 'E')
       {
-        hasIcons = true;
+        hasIcons |= true;
       }
 
       if (annotations[i].displayCharacter == null)
@@ -191,14 +191,15 @@ public class AlignmentAnnotation
         firstChar = annotations[i].displayCharacter.charAt(0);
         // check to see if it looks like a sequence or is secondary structure
         // labelling.
-        if (
+        if (annotations[i].secondaryStructure!=' ' && !hasIcons &&
         // Uncomment to only catch case where displayCharacter==secondary
         // Structure
         // to correctly redisplay SS annotation imported from Stockholm,
         // exported to JalviewXML and read back in again.
         // &&
         // annotations[i].displayCharacter.charAt(0)==annotations[i].secondaryStructure
-        firstChar != 'H'
+        firstChar != ' '
+                && firstChar != 'H'
                 && firstChar != 'E'
                 && firstChar != '-'
                 && firstChar < jalview.schemes.ResidueProperties.aaIndex.length)