09a8f6e6a19a7dcb4adb2f51639f8e6420694f89
galt
  Thu Jul 15 20:51:22 2021 -0700
Fixed multi-region minor problem in gtex and barchart handling the tracks ss list. fixes #27855

diff --git src/hg/hgTracks/gtexTracks.c src/hg/hgTracks/gtexTracks.c
index dd5ea00..f0dc3a1 100644
--- src/hg/hgTracks/gtexTracks.c
+++ src/hg/hgTracks/gtexTracks.c
@@ -1115,54 +1115,56 @@
     heightPer = gtexSquishItemHeight() * 2;  // the squish packer halves this
     lineHeight=heightPer+1;
     }
 else if ((vis == tvPack) || (vis == tvFull))
     {
     // layout -- initially as fixed height
     heightPer = tl.fontHeight;
     lineHeight=heightPer;
     }
 
 height = tgFixedTotalHeightOptionalOverflow(tg, vis, lineHeight, heightPer, FALSE);
 
 if ((vis == tvPack) || (vis == tvFull))
     {
     // set variable height rows
-    if (tg->ss && tg->ss->rowCount != 0)
+
+    struct spaceSaver *ss = findSpaceSaver(tg, vis); // ss is a list now
+    assert(ss); // viz matches, we have the right one
+
+    if (ss && ss->rowCount != 0)
         {
-        if (!tg->ss->rowSizes)
+        if (!ss->rowSizes)
 	    {
 	    // collect the rowSizes data across all windows
 	    assert(currentWindow==windows); // first window
 	    assert(tg->ss->vis == vis); // viz matches, we have the right one
 	    struct spaceSaver *ssHold; 
 	    AllocVar(ssHold);
 	    struct track *tgSave = tg;
 	    for(tg=tgSave; tg; tg=tg->nextWindow)
 		{
 		assert(tgSave->ss->vis == tg->ss->vis); // viz matches, we have the right one
 		spaceSaverSetRowHeights(tg->ss, ssHold, gtexGeneHeight);
 		}
 	    // share the rowSizes data across all windows
 	    for(tg=tgSave; tg; tg=tg->nextWindow)
 		{
 		tg->ss->rowSizes = ssHold->rowSizes;
 		}
 	    tg = tgSave;
 	    }
-	struct spaceSaver *ss = findSpaceSaver(tg, vis); // ss is a list now
-	assert(ss); // viz matches, we have the right one
 	height = spaceSaverGetRowHeightsTotal(ss);
         }
     }
 tg->height = height;
 
 return height;
 }
 
 static void gtexGenePreDrawItems(struct track *tg, int seqStart, int seqEnd,
                                 struct hvGfx *hvg, int xOff, int yOff, int width,
                                 MgFont *font, Color color, enum trackVisibility vis)
 {
 if (vis == tvSquish || vis == tvDense)
     {
     // NonProp routines not relevant to these modes, and they interfere