7636f820b39ce8346dd252f232aea4e78258f3de
hiram
  Mon Dec 19 10:10:54 2011 -0800
fixup color problem for chain net caePb3 tracks on ce10
diff --git src/hg/hgTracks/netTrack.c src/hg/hgTracks/netTrack.c
index e89784a..e842e10 100644
--- src/hg/hgTracks/netTrack.c
+++ src/hg/hgTracks/netTrack.c
@@ -92,32 +92,32 @@
 if (netCart->netColor == netColorGrayScale)
     switch(level)
 	{
 	case 1: return(shadesOfGray[9]); break;
 	case 2: return(shadesOfGray[7]); break;
 	case 3: return(shadesOfGray[6]); break;
 	case 4: return(shadesOfGray[5]); break;
 	case 5: return(shadesOfGray[4]); break;
 	case 6: return(shadesOfGray[3]); break;
 	default: return(shadesOfGray[2]); break;
 	}
 
 static Color color;
 if (!sameString(chrom, netColorLastChrom))
     color = getSeqColor(chrom, rHvg);
-if (0 == color)
-    color = 1;	/*	don't display in white	*/
+if (0 == color)		/* color 0 is actually an error condition, see */
+    color = MG_BLACK;	/* makeChromosomeShades() in simpleTracks.c	*/
 netColorLastChrom = chrom;
 return color;
 }
 
 static void rNetBox(struct hvGfx *hvg, struct cnFill *fill, int start, int end, int y, int level,
 	Color color, Color barbColor, int orientation)
 /* Draw a scaled box. */
 {
 int x1,x2,w;
 
 /* Do clipping before scaling because scaling may cause
  * integer overflow. */
 if (start < winStart) start = winStart;
 if (end > winEnd) end = winEnd;
 if (start >= end)
@@ -185,30 +185,31 @@
 	}
     }
 }
 
 
 static void rNetDraw(struct track *tg, struct hvGfx *hvg, struct cnFill *fillList, int level, int y)
 /* Recursively draw net. */
 {
 struct cnFill *fill;
 struct cnFill *gap;
 Color color, invColor;
 int orientation;
 
 for (fill = fillList; fill != NULL; fill = fill->next)
     {
+
     color = netColor(tg, fill->qName, level);
     invColor = hvGfxContrastingColor(rHvg, color);
     orientation = orientFromChar(fill->qStrand);
     if (fill->children == NULL || fill->tSize * rScale < 2.5)
     /* Draw single solid box if no gaps or no room to draw gaps. */
         {
 	rNetBox(hvg, fill, fill->tStart, fill->tStart + fill->tSize,
 		y, level, color, invColor, orientation);
 	}
     else
         {
 	int fStart = fill->tStart;
 	for ( gap = fill->children; gap != NULL; gap = gap->next)
 	    {
 	    if (gap->tSize * rScale >= 1)