JAL-1114 - refactor methods handling Vectors and Hashtables to Lists and Maps, and...
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index 474d392..330620c 100644 (file)
@@ -1172,7 +1172,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
   {
     // /////ONLY WORKS WITH NONE WRAPPED ALIGNMENTS
     // ////////////////////////////////////////////
-    int idWidth = getVisibleIdWidth(true);
+    int idWidth = getVisibleIdWidth(false);
     FontMetrics fm = getFontMetrics(av.getFont());
     int scaleHeight = av.charHeight + fm.getDescent();
 
@@ -1400,7 +1400,6 @@ public class AlignmentPanel extends GAlignmentPanel implements
     // remove old automatic annotation
     // add any new annotation
 
-    Vector gr = av.getAlignment().getGroups(); // OrderedBy(av.getAlignment().getSequencesArray());
     // intersect alignment annotation with alignment groups
 
     AlignmentAnnotation[] aan = av.getAlignment().getAlignmentAnnotation();
@@ -1417,13 +1416,11 @@ public class AlignmentPanel extends GAlignmentPanel implements
         }
       }
     }
-    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