89a26e18a779d448fb36d10c13f763030e8733cf
braney
  Wed Oct 18 09:24:40 2017 -0700
back out brain-dead change that breaks overlay "none" in multiwigs

diff --git src/hg/hgTracks/multiWig.c src/hg/hgTracks/multiWig.c
index dfe7518..8094afe 100644
--- src/hg/hgTracks/multiWig.c
+++ src/hg/hgTracks/multiWig.c
@@ -482,41 +482,41 @@
     Color yellow = hvGfxFindRgb(hvg, &undefinedYellowColor);
     hvGfxBox(hvg, fullInsideX, yOff, fullInsideWidth, tg->height, yellow);
     hvGfxUnclip(hvg);
     hvGfxSetClip(hvg, clipXBak, clipYBak, clipWidthBak, clipHeightBak);
     }
 
 struct wigCartOptions *wigCart = tg->wigCartData;
 struct wigGraphOutput *wgo = tg->wigGraphOutput;
 
 if (wigCart->aggregateFunction == wiggleAggregateAdd || wigCart->aggregateFunction == wiggleAggregateSubtract)
     {
     mergeWiggles(tg->subtracks, wigCart->aggregateFunction == wiggleAggregateAdd);
     tg->subtracks->next = NULL;
     }
 int numTrack = 0;
-int height = tg->totalHeight(tg, vis); // use the parent track for the height
 for (subtrack = tg->subtracks; subtrack != NULL; subtrack = subtrack->next)
     {
     if (isSubtrackVisible(subtrack))
 	{
         if (!subtrack->networkErrMsg || !errMsgShown)
 	    {
 	    if (subtrack->networkErrMsg)
 	       errMsgShown = TRUE;
 	    wgo->numTrack = numTrack++;
 	    subtrack->wigGraphOutput = wgo;
+	    int height = subtrack->totalHeight(subtrack, vis);
 	    hvGfxSetClip(hvg, xOff, y, width, height);
 	    if (wigCart->aggregateFunction != wiggleAggregateNone)
 		subtrack->lineHeight = tg->lineHeight;
 	    subtrack->drawItems(subtrack, seqStart, seqEnd, hvg, xOff, y, width, font, color, vis);
 	    if (wigCart->aggregateFunction == wiggleAggregateNone)
 		{
 		y += height + 1;
 		wgo->yOff = y;
 		}
 	    hvGfxUnclip(hvg);
 	    }
 	}
     }
 
 if (wigCart->aggregateFunction == wiggleAggregateTransparent)