Don't parse input id, leave it as it is
[jalview.git] / src / jalview / gui / SeqCanvas.java
index c3972ee..42424d9 100755 (executable)
@@ -48,8 +48,6 @@ public class SeqCanvas extends JComponent
     int LABEL_WEST;\r
     int LABEL_EAST;\r
 \r
-    boolean isOverview = false;\r
-\r
     /**\r
      * Creates a new SeqCanvas object.\r
      *\r
@@ -65,7 +63,7 @@ public class SeqCanvas extends JComponent
         setBackground(Color.white);\r
     }\r
 \r
-    MCview.PDBCanvas pdbViewer;\r
+    MCview.PDBCanvas pdbCanvas;\r
     public SequenceRenderer getSequenceRenderer()\r
     {\r
       return sr;\r
@@ -76,11 +74,17 @@ public class SeqCanvas extends JComponent
       return fr;\r
     }\r
 \r
-    public void setPDBViewer(MCview.PDBCanvas pc)\r
+    public void setPDBCanvas(MCview.PDBCanvas pc)\r
+    {\r
+      pdbCanvas = pc;\r
+    }\r
+\r
+    public AlignViewport getViewport()\r
     {\r
-      pdbViewer = pc;\r
+      return av;\r
     }\r
 \r
+\r
     /**\r
      * DOCUMENT ME!\r
      *\r
@@ -275,17 +279,20 @@ public class SeqCanvas extends JComponent
     // Set this to false to force a full panel paint\r
     public void paintComponent(Graphics g)\r
     {\r
+        super.paintComponent(g);\r
+\r
         sr.renderGaps(av.renderGaps);\r
 \r
-        if ((img != null) &&\r
-                (fastPaint || (getWidth() != g.getClipBounds().width) ||\r
-                (getHeight() != g.getClipBounds().height)))\r
+        if ( img != null && (fastPaint\r
+             || (getVisibleRect().width != g.getClipBounds().width)\r
+             || (getVisibleRect().height != g.getClipBounds().height)))\r
         {\r
             g.drawImage(img, 0, 0, this);\r
             fastPaint = false;\r
             return;\r
         }\r
 \r
+\r
         // this draws the whole of the alignment\r
         imgWidth = getWidth();\r
         imgHeight = getHeight();\r
@@ -298,7 +305,6 @@ public class SeqCanvas extends JComponent
             return;\r
         }\r
 \r
-\r
         img = new BufferedImage(imgWidth, imgHeight, BufferedImage.TYPE_INT_RGB);\r
         gg = (Graphics2D) img.getGraphics();\r
         gg.setFont(av.getFont());\r
@@ -321,9 +327,9 @@ public class SeqCanvas extends JComponent
 \r
         g.drawImage(img, 0, 0, this);\r
 \r
-        if (pdbViewer != null)\r
+        if (pdbCanvas != null)\r
         {\r
-          pdbViewer.updateSeqColours();\r
+         pdbCanvas.updateSeqColours();\r
         }\r
 \r
     }\r
@@ -632,7 +638,7 @@ public class SeqCanvas extends JComponent
             groupIndex = 0;\r
         }\r
 \r
-        if (group != null && !isOverview)\r
+        if (group != null)\r
         {\r
             do\r
             {\r