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/barChartTrack.c src/hg/hgTracks/barChartTrack.c index 9d4dd48..05f5ec4 100644 --- src/hg/hgTracks/barChartTrack.c +++ src/hg/hgTracks/barChartTrack.c @@ -851,55 +851,56 @@ // for visibility, set larger than the usual squish, which is half font height struct barChartTrack *extras = (struct barChartTrack *)tg->extraUiData; heightPer = extras->squishHeight * 2; // the squish packer halves this lineHeight=heightPer+1; } else if ((vis == tvPack) || (vis == tvFull)) { heightPer = tl.fontHeight; lineHeight=heightPer; } height = tgFixedTotalHeightOptionalOverflow(tg, vis, lineHeight, heightPer, FALSE); if ((vis == tvPack) || (vis == tvFull)) { + struct spaceSaver *ss = findSpaceSaver(tg, vis); // ss is a list now + assert(ss); // viz matches, we have the right one + // set variable height rows - if (tg->ss && tg->ss->rowCount) + if (ss && ss->rowCount) { - 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, getBarChartHeight); } // 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 barChartPreDrawItems(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