i, finder));
}
+ private boolean useCache = //
+ true // option to use cache
+ // false // option to not use cache
+ ;
public int getResidueColourInt(boolean showBoxes, ResidueShaderI shader,
SequenceGroup[] allGroups, final SequenceI seq, int i,
FeatureColourFinder finder)
{
- int c = seq.getColor(i);
+
+ int c = (useCache ? seq.getColor(i) : 0);
if (c != 0)
{
return c;
// if there's a FeatureColourFinder we might override the residue colour
// here with feature colouring
- return seq.setColor(i,
- finder == null || finder.noFeaturesDisplayed() ? col
- : finder.findFeatureColourInt(col, seq, i));
+ c = (finder == null || finder.noFeaturesDisplayed() ? col
+ : finder.findFeatureColourInt(col, seq, i));
+ return (useCache ? seq.setColor(i, c) : c);
}
/**