Vector highlightRes;\r
boolean pdbAction = false;\r
boolean seqColoursReady = false;\r
+ jalview.gui.FeatureRenderer fr;\r
\r
public PDBCanvas(jalview.gui.SeqCanvas seqcanvas, Sequence seq)\r
{\r
void colourBySequence(PDBChain chain)\r
{\r
// System.out.println("colour by seq");\r
+ boolean showFeatures = false;\r
+ if(seqcanvas.getViewport().getShowSequenceFeatures())\r
+ {\r
+ showFeatures = true;\r
+ if (fr == null)\r
+ fr = new jalview.gui.FeatureRenderer(seqcanvas.getViewport());\r
+\r
+ fr.transferSettings( seqcanvas.getFeatureRenderer() );\r
+ }\r
+\r
for (int i = 0; i < chain.bonds.size(); i++)\r
{\r
Bond tmp = (Bond) chain.bonds.elementAt(i);\r
if(tmp.startCol==null)\r
tmp.startCol = Color.white;\r
\r
- tmp.startCol = seqcanvas.getFeatureRenderer().\r
- findFeatureColour(tmp.startCol, sequence, index);\r
+ if(showFeatures)\r
+ tmp.startCol = fr.findFeatureColour(tmp.startCol, sequence, index);\r
}\r
}\r
\r
getResidueBoxColour( sequence, index);\r
if(tmp.endCol==null)\r
tmp.endCol = Color.white;\r
- tmp.endCol = seqcanvas.getFeatureRenderer().\r
- findFeatureColour(tmp.endCol, sequence, index);\r
+ if(showFeatures)\r
+ tmp.endCol = fr.findFeatureColour(tmp.endCol, sequence, index);\r
}\r
}\r
}\r
}\r
\r
\r
+ Zsort zsort;\r
public void drawScene(Graphics g)\r
{\r
if (zbuffer)\r
{\r
- Zsort.Zsort(visiblebonds);\r
+ if(zsort==null)\r
+ zsort = new Zsort();\r
+\r
+ zsort.Zsort(visiblebonds);\r
}\r
\r
Bond tmpBond=null;\r
\r
if (depthcue && !bymolecule)\r
{\r
- if (tmpBond.start[2] < (centre[2] - (maxwidth / 6))) {\r
+ if (tmpBond.start[2] < (centre[2] - (maxwidth / 6)))\r
+ {\r
g.setColor(tmpBond.startCol.darker().darker());\r
drawLine(g, xstart, ystart, xmid, ymid);\r
g.setColor(tmpBond.endCol.darker().darker());\r