92c5b9ee733e28d68fbb180b26d175b46776a27e
max
Sat Sep 26 21:59:16 2026 -0700
hgTracks: fix hub genome dropdown's db-field collision, add real labels and position lookup
The groupDropdown "Genomes:" select shared name='db' with TrackForm's own
hidden db field, so submitting any button in the form (e.g. Hide all) sent
two values for db and the hub's own genome silently won it. Give the select
its own id instead, and switch genomes via an onchange handler that sets
the real db field and resubmits.
Also label each option via hOrganism()/hFreezeFromDb() (the same lookup
hgTracks already uses for the page title), so native UCSC assemblies get a
readable label too, not just GenArk-style hub genomes; and reset position
to the target genome's own default position via hDbDb() before resubmitting,
since a coordinate from the current assembly usually doesn't exist in the
next one.
refs #38434
diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 2dd6b287f7e..8bf9456ffae 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -10295,41 +10295,90 @@
tracks that are annotations on %s that have been lifted to this \
assembly, along with a track (Alignment Differences) that shows \
mismatches and indels between %s and this assembly."\
, hub->defaultDb, hub->defaultDb);
else
safef(infoText, sizeof infoText, "A track hub is a list of tracks produced and hosted by external data providers. The UCSC browser group is not responsible for them. This hub is loaded from %s", hub->url);
printInfoIconColor(infoText, "white");
}
hPrintf("
\n");
if (hubName)
{
if (cfgOptionBooleanDefault("groupDropdown", FALSE) && hub && hub->genomeList && hub->genomeList->next)
{
- puts("Genomes: