ensure we have valid fontMetrics - (NPE was raised when wrap mode enabled on view...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 3 Nov 2011 17:23:44 +0000 (17:23 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 3 Nov 2011 17:23:44 +0000 (17:23 +0000)
src/jalview/renderer/AnnotationRenderer.java

index 0d7d4ca..d063c5b 100644 (file)
@@ -203,6 +203,7 @@ public class AnnotationRenderer
     // NOTES:
     // AnnotationPanel needs to implement: ImageObserver, access to AlignViewport
     updateFromAwtRenderPanel(annotPanel, av);
+    fm = g.getFontMetrics();  
     AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
   
     int x = 0, y = 0;