JAL-2603 Putative fix
authorkiramt <k.mourao@dundee.ac.uk>
Wed, 28 Jun 2017 11:03:29 +0000 (12:03 +0100)
committerkiramt <k.mourao@dundee.ac.uk>
Wed, 28 Jun 2017 11:03:29 +0000 (12:03 +0100)
src/jalview/gui/OverviewCanvas.java

index 27f9c3f..63075dc 100644 (file)
@@ -119,16 +119,29 @@ public class OverviewCanvas extends JComponent
   {
     miniMe = null;
 
-    if (showSequenceFeatures)
+    if (!av.getShowBoxes())
     {
-      fr.transferSettings(transferRenderer);
+      // boxes are not shown on main viewport
+      or = new OverviewRenderer(sr, fr, od);
+      miniMe = new BufferedImage(od.getWidth(), od.getHeight(),
+              BufferedImage.TYPE_INT_RGB);
+      miniMe.getGraphics().setColor(Color.WHITE);
+      miniMe.getGraphics().fillRect(0, 0, od.getWidth(),
+              od.getSequencesHeight());
     }
+    else
+    {
+      if (showSequenceFeatures)
+      {
+        fr.transferSettings(transferRenderer);
+      }
 
-    setPreferredSize(new Dimension(od.getWidth(), od.getHeight()));
+      setPreferredSize(new Dimension(od.getWidth(), od.getHeight()));
 
-    or = new OverviewRenderer(sr, fr, od);
-    miniMe = or.draw(od.getRows(av.getAlignment()),
-            od.getColumns(av.getAlignment()));
+      or = new OverviewRenderer(sr, fr, od);
+      miniMe = or.draw(od.getRows(av.getAlignment()),
+              od.getColumns(av.getAlignment()));
+    }
 
     Graphics mg = miniMe.getGraphics();