ad3c44dc8098d672ef9a50c240f6fe6cff1baf81
kent
  Tue Apr 26 11:20:24 2011 -0700
Making it so that only visible subtracks are used in the autoScale calcs.
diff --git src/hg/hgTracks/multiWig.c src/hg/hgTracks/multiWig.c
index 022c51a..839b78c 100644
--- src/hg/hgTracks/multiWig.c
+++ src/hg/hgTracks/multiWig.c
@@ -64,33 +64,36 @@
     Color yellow = hvGfxFindRgb(hvg, &undefinedYellowColor);
     hvGfxBox(hvg, xOff, yOff, width, tg->height, yellow);
     }
 
 /* Cope with autoScale - we do it here rather than in the child tracks, so that
  * all children can be on same scale. */
 struct wigCartOptions *wigCart = tg->extraUiData;
 if (wigCart->autoScale)
     {
     /* Force load of all predraw arrays so can do calcs. Build up list, and then
      * figure out max/min.  No worries about multiple loading, the loaders protect
      * themselves. */
     struct slRef *refList = NULL;
     for (subtrack = tg->subtracks; subtrack != NULL; subtrack = subtrack->next)
         {
+	if (isSubtrackVisible(subtrack))
+	    {
 	struct preDrawContainer *pre = subtrack->loadPreDraw(subtrack, seqStart, seqEnd, width);
 	refAdd(&refList, pre);
 	}
+	}
     double minVal, maxVal;
     minMaxVals(refList, &minVal, &maxVal);
     slFreeList(&refList);
 
     /* Cope with log transform if need be */
     if (wigCart->transformFunc == wiggleTransformFuncLog)
          {
 	 minVal = wiggleLogish(minVal);
 	 maxVal = wiggleLogish(maxVal);
 	 }
 
     /* Loop through again setting up the wigCarts of the children to have minY/maxY for
      * our limits and autoScale off. */
     for (subtrack = tg->subtracks; subtrack != NULL; subtrack = subtrack->next)
         {