src/hg/hgTracks/simpleTracks.c 1.112
1.112 2009/11/17 20:17:57 angie
bugfix: don't assume we have linkedFeatures in baseColorInitTrack because this is called for linkedFeaturesSeries too. Use tg->drawItems as a proxy for type (lf vs. lfs). Then the proper range is set and we can replace a slow hDnaFromSeq call with getCachedDna.
Index: src/hg/hgTracks/simpleTracks.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/simpleTracks.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -b -B -U 4 -r1.111 -r1.112
--- src/hg/hgTracks/simpleTracks.c 11 Nov 2009 20:41:29 -0000 1.111
+++ src/hg/hgTracks/simpleTracks.c 17 Nov 2009 20:17:57 -0000 1.112
@@ -3014,9 +3014,9 @@
* and tg->drawItemAt has to be filled in. */
{
if (tg->mapItem == NULL)
tg->mapItem = genericMapItem;
-if (vis != tvDense)
+if (vis != tvDense && baseColorCanDraw(tg))
baseColorInitTrack(hvg, tg);
if (vis == tvPack || vis == tvSquish)
genericDrawItemsPackSquish(tg, seqStart, seqEnd, hvg, xOff, yOff, width,
font, color, vis);