followSelections flag now set via user preferences, and disabled for 2.5.1 * JAL...
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index 59d7b97..750e823 100755 (executable)
@@ -1327,6 +1327,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
   public void updateAnnotation(boolean applyGlobalSettings)
   {
+    // TODO: this should be merged with other annotation update stuff - that sits on AlignViewport
     boolean updateCalcs = false;
     boolean conv = av.isShowGroupConservation();
     boolean cons = av.isShowGroupConsensus();
@@ -1343,6 +1344,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
     AlignmentAnnotation[] aan = av.alignment.getAlignmentAnnotation();
     Hashtable oldrfs = new Hashtable();
+    if (aan != null)
+    {
     for (int an = 0; an < aan.length; an++)
     {
       if (aan[an].autoCalculated && aan[an].groupRef != null)
@@ -1352,7 +1355,10 @@ public class AlignmentPanel extends GAlignmentPanel implements
         aan[an] = null;
       }
     }
+    }
     SequenceGroup sg;
+    if (gr != null)
+    {
     for (int g = 0; g < gr.size(); g++)
     {
       updateCalcs = false;
@@ -1379,6 +1385,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
         sg.recalcConservation();
       }
     }
+    }
     oldrfs.clear();
     adjustAnnotationHeight();
   }