JAL-1291 - don't touch the graphics object until after deciding to skip annotation row
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 24 May 2013 12:27:49 +0000 (13:27 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 24 May 2013 14:10:56 +0000 (15:10 +0100)
src/jalview/gui/AnnotationLabels.java

index 7d8a596..ec56388 100755 (executable)
@@ -882,8 +882,6 @@ public class AnnotationLabels extends JPanel implements MouseListener,
       for (int i = 0; i < aa.length; i++)
       {
         visible = true;
-        g.setColor(Color.black);
-
         if (!aa[i].visible)
         {
           hasHiddenRows = true;
@@ -916,6 +914,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
           // don't draw what isn't visible
           continue;
         }}
+        g.setColor(Color.black);
+
         offset = -aa[i].height / 2;
 
         if (aa[i].hasText)