f658d6278f6d4c686f79dd8fbf8c5895380a91ed braney Mon Sep 8 16:48:39 2025 -0700 ongoing fixes to quickLift diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index b1199c94216..8a9b0acde9c 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -3595,62 +3595,60 @@ if (restrictionDate != NULL) { printf("<A HREF=\"/ENCODE/terms.html\" TARGET=_BLANK><B>Restricted until</A>:</B> %s <BR>\n", restrictionDate); freeMem(restrictionDate); } } static void printOrigAssembly(struct trackDb *tdb) /* If this annotation has been lifted, print the original * freeze, as indicated by the "origAssembly" trackDb setting */ { trackDbPrintOrigAssembly(tdb, database); } -static char *getHtmlFromSelfOrParent(struct trackDb *tdb) +static char *getHtmlFromSelfOrParent(struct trackDb *tdb, char *liftDb) /* Get html from self or from parent if not in self. */ { for (;tdb != NULL; tdb = tdb->parent) { + if (liftDb && (tdb->html == NULL)) + tdb->html = getTrackHtml(liftDb, tdb->table); if (tdb->html != NULL && tdb->html[0] != 0) return tdb->html; } return NULL; } void printTrackHtml(struct trackDb *tdb) /* If there's some html associated with track print it out. Also print * last update time for data table and make a link * to the TB table schema page for this table. */ { if (!isCustomTrack(tdb->track)) { - char *liftDb = cloneString(trackDbSetting(tdb, "quickLiftDb")); - - if (liftDb && (tdb->html == NULL)) - tdb->html = getTrackHtml(liftDb, tdb->table); - printRelatedTracks(database, trackHash, tdb, cart); extraUiLinks(database, tdb, cart); printTrackUiLink(tdb); printOrigAssembly(tdb); printDataVersion(database, tdb); printUpdateTime(database, tdb, NULL); printDataRestrictionDate(tdb); } -char *html = getHtmlFromSelfOrParent(tdb); +char *liftDb = cloneString(trackDbSetting(tdb, "quickLiftDb")); +char *html = getHtmlFromSelfOrParent(tdb, liftDb); if (html != NULL && html[0] != 0) { htmlHorizontalLine(); // Add pennantIcon printPennantIconNote(tdb); // Wrap description html in div with limited width, so when the page is very wide // due to long details, the user doesn't have to scroll right to read the description. puts("<div class='readableWidth'>"); puts(html); puts("</div>"); } hPrintf("<BR>\n"); }