make sure references are intact when group annotation is accessed
authorjprocter <Jim Procter>
Thu, 29 Apr 2010 16:09:07 +0000 (16:09 +0000)
committerjprocter <Jim Procter>
Thu, 29 Apr 2010 16:09:07 +0000 (16:09 +0000)
src/jalview/datamodel/SequenceGroup.java

index fbcf303..dcb0150 100755 (executable)
@@ -953,10 +953,10 @@ public class SequenceGroup
     {
        consensus = new AlignmentAnnotation("","",
               new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
-      consensus.hasText = true;
-      consensus.autoCalculated = true;
-      consensus.groupRef = this;
     }
+    consensus.hasText = true;
+    consensus.autoCalculated = true;
+    consensus.groupRef = this;
     consensus.label = "Consensus for "+getName();
     consensus.description = "Percent Identity";
     return consensus;
@@ -969,10 +969,11 @@ public class SequenceGroup
     if (conservation == null) {
       conservation = new AlignmentAnnotation("","", new Annotation[1], 0f, 11f,
             AlignmentAnnotation.BAR_GRAPH);
+    }
+    
     conservation.hasText = true;
     conservation.autoCalculated = true;
     conservation.groupRef = this;
-    }
     conservation.label = "Conservation for "+getName();
     conservation.description = "Conservation for group "+getName()+" less than " + consPercGaps
             + "% gaps";