e061eee76c1c9e8c8161f99379273aa0d1146c1f max Sat Sep 26 21:52:35 2026 -0700 hgTracks: quickLifted superTracks keep their own bare-name visibility A quickLifted superTrack's cart visibility var should always be read under its own (undecorated) name, the same as its source assembly used, even when the target assembly happens to have a native superTrack of the same name. diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index bb2d6ae79ae..2dd6b287f7e 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -7696,44 +7696,46 @@ cartSetString(cart, defaultGeneTrack, s); } for (track = trackList; track != NULL; track = track->next) { // deal with any supertracks we're seeing for the first time if (tdbIsSuperTrackChild(track->tdb)) { struct hashEl *hel = NULL; if ((hel = hashLookup(superTrackHash, track->tdb->parent->track)) == NULL) // we haven't seen this guy { // QuickLifted tracks are exempt from hideTracks -- their visibility is // carried over from the source assembly's cart (and may still be under the // undecorated name until migrated below), so consult the cart, not the URL. - boolean superFromCart = !hideTracks || - (trackDbSetting(track->tdb, "quickLiftUrl") != NULL); + boolean isQuickLift = (trackDbSetting(track->tdb, "quickLiftUrl") != NULL); + boolean superFromCart = !hideTracks || isQuickLift; // first deal with visibility of super track char *s = superFromCart ? cartOptionalString(cart, track->tdb->parent->track) : cgiOptionalString(track->tdb->parent->track); if (s) { track->tdb->parent->visibility = hTvFromString(s) ; cartSetString(cart, track->tdb->parent->track, s); } else if (startsWith("hub_", track->tdb->parent->track)) { s = superFromCart ? cartOptionalString( cart, trackHubSkipHubName(track->tdb->parent->track)) : cgiOptionalString( trackHubSkipHubName(track->tdb->parent->track)); - // the bare name is the native track's if the assembly has one by that name - if (s != NULL && !hubTrackOwnsBareName(database, track->tdb->parent->track)) + // the bare name is the native track's if the assembly has one by that name -- + // except for a quickLifted track, whose bare name is always its own: it is + // meant to reuse the source assembly's name regardless of what else is native here + if (s != NULL && !isQuickLift && !hubTrackOwnsBareName(database, track->tdb->parent->track)) s = NULL; if (s) { cartSetString(cart, track->tdb->parent->track, s); cartRemove(cart, trackHubSkipHubName(track->tdb->parent->track)); // remove the undecorated version track->tdb->parent->visibility = hTvFromString(s) ; } } // now look to see if we have a _hideKids statement to turn off all subtracks (including the current one) unsigned hideKids = 0; char *usedThis = buffer; safef(buffer, sizeof buffer, "%s_hideKids", track->tdb->parent->track); s = cartOptionalString(cart, buffer);