JAL-4290 Fix image comparison between gui and headless output. Images are now the...
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index 358560b..0f5a9e8 100644 (file)
@@ -388,7 +388,10 @@ public class AlignmentPanel extends GAlignmentPanel implements
     // Also check annotation label widths
     if (includeAnnotations && al.getAlignmentAnnotation() != null)
     {
-      fm = c.getFontMetrics(getAlabels().getFont());
+      if (legacy)
+      {
+        fm = c.getFontMetrics(getAlabels().getFont());
+      }
 
       if (!legacy || Jalview.isHeadlessMode())
       {
@@ -1300,8 +1303,9 @@ public class AlignmentPanel extends GAlignmentPanel implements
       return idwidth.intValue() + ID_WIDTH_PADDING;
     }
 
-    int w = getIdPanel().getWidth();
-    w = calculateIdWidth(-1, true, true).width;
+    // int w = getIdPanel().getWidth();
+    // w = calculateIdWidth(-1, true, true).width;
+    int w = calculateIdWidth(-1, true, true).width;
     return (w > 0 ? w : calculateIdWidth().width);
   }