src/hg/hgTracks/simpleTracks.c 1.87

1.87 2009/06/25 00:09:32 angie
In linkedFeaturesDrawAt's hairy if() that decides whether to call baseColorDrawItem, !psl no longer cuts it as a test for whether we are drawing codons.
Index: src/hg/hgTracks/simpleTracks.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/simpleTracks.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -b -B -U 4 -r1.86 -r1.87
--- src/hg/hgTracks/simpleTracks.c	24 Jun 2009 20:33:04 -0000	1.86
+++ src/hg/hgTracks/simpleTracks.c	25 Jun 2009 00:09:32 -0000	1.87
@@ -2372,10 +2372,12 @@
 lfColors(tg, lf, hvg, &color, &bColor);
 if (vis == tvDense && trackDbSetting(tg->tdb, EXP_COLOR_DENSE))
     color = saveColor;
 
-if (psl && (drawOpt == baseColorDrawItemCodons || drawOpt == baseColorDrawDiffCodons ||
-	    drawOpt == baseColorDrawGenomicCodons))
+boolean baseColorNeedsCodons = (drawOpt == baseColorDrawItemCodons ||
+				drawOpt == baseColorDrawDiffCodons ||
+				drawOpt == baseColorDrawGenomicCodons);
+if (psl && baseColorNeedsCodons)
     {
     boolean isXeno = ((tg->subType == lfSubXeno) || (tg->subType == lfSubChain) ||
 		      startsWith("mrnaBla", tg->mapName));
     int sizeMul = pslIsProtein(psl) ? 3 : 1;
@@ -2443,9 +2445,9 @@
     if (e > s)
 	{
         if (drawOpt > baseColorDrawOff &&
             e + 6 >= winStart && s - 6 < winEnd &&
-	    (e-s <= 3 || psl != NULL))
+	    (e-s <= 3 || !baseColorNeedsCodons))
                 baseColorDrawItem(tg, lf, sf->grayIx, hvg, xOff, y,
 				  scale, font, s, e, heightPer,
 				  zoomedToCodonLevel, mrnaSeq, sf, psl,
 				  drawOpt,