JAL-1114 - refactor methods handling Vectors and Hashtables to Lists and Maps, and...
[jalview.git] / src / jalview / appletgui / AlignmentPanel.java
index 99084ba..e9d418e 100644 (file)
@@ -919,7 +919,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, Alignme
     // remove old automatic annotation
     // add any new annotation
 
-    Vector gr = av.getAlignment().getGroups(); // OrderedBy(av.alignment.getSequencesArray());
+    ; // OrderedBy(av.alignment.getSequencesArray());
     // intersect alignment annotation with alignment groups
 
     AlignmentAnnotation[] aan = av.getAlignment().getAlignmentAnnotation();
@@ -936,13 +936,11 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, Alignme
         }
       }
     }
-    SequenceGroup sg;
-    if (gr != null)
+    if (av.getAlignment().getGroups()!= null)
     {
-      for (int g = 0; g < gr.size(); g++)
+      for (SequenceGroup sg:av.getAlignment().getGroups())
       {
         updateCalcs = false;
-        sg = (SequenceGroup) gr.elementAt(g);
         if (applyGlobalSettings || !oldrfs.containsKey(sg))
         {
           // set defaults for this group's conservation/consensus