Annotation adjustment moved to EditCommand
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index 7c57e6b..6803e9f 100755 (executable)
@@ -27,6 +27,12 @@ package jalview.datamodel;
  */
 public class AlignmentAnnotation
 {
+  /** If true, this annotations is calculated every edit,
+   * eg consensus, quality or conservation graphs */
+  public boolean autoCalculated = false;
+
+  public String annotationId = Math.random() +"";
+
     public SequenceI sequenceRef;
 
     /** DOCUMENT ME!! */
@@ -120,10 +126,16 @@ public class AlignmentAnnotation
           hasIcons = true;
         }
 
-        if (annotations[i].secondaryStructure != 'H'
-            && annotations[i].secondaryStructure != 'E')
+        if (annotations[i].displayCharacter.length()==1
+            && !annotations[i].displayCharacter.equals("H")
+            && !annotations[i].displayCharacter.equals("E")
+            && !annotations[i].displayCharacter.equals("-"))
         {
-          nonSSLabel = true;
+          if(jalview.schemes.ResidueProperties.aaIndex
+             [annotations[i].displayCharacter.charAt(0)]>0)
+          {
+            nonSSLabel = true;
+          }
         }
 
         if (annotations[i].displayCharacter.length() > 0)
@@ -142,8 +154,6 @@ public class AlignmentAnnotation
             annotations[j].displayCharacter
                 =String.valueOf(annotations[j].secondaryStructure);
             annotations[j].secondaryStructure = ' ';
-            if(annotations[j].description.length()<1)
-              annotations[j].description = annotations[j].displayCharacter;
           }
 
         }