5ed8f560efb5af18673ae76180e24ec493698cb2 galt Thu Nov 20 17:07:25 2025 -0800 Fixes pdf output problem. We set hgFindMatches = NULL for pdf output to suppress the item search highlight. But loading in bigBedTrack and squishPackyMode both depend on that search term, so we cannot just set it to NULL. A copy of it called origHgFindMatches exists and is available to those routines that need the original search value. diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index 20da42a1f17..cbf1533cfac 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -273,30 +273,32 @@ int maxShade = 9; /* Highest shade in a color gradient. */ Color shadesOfGray[10+1]; /* 10 shades of gray from white to black * Red is put at end to alert overflow. */ Color shadesOfBrown[10+1]; /* 10 shades of brown from tan to tar. */ struct rgbColor brownColor = {100, 50, 0, 255}; struct rgbColor tanColor = {255, 240, 200, 255}; struct rgbColor guidelineColor = {220, 220, 255, 255}; struct rgbColor multiRegionAltColor = {235, 235, 255, 255}; struct rgbColor undefinedYellowColor = {240,240,180, 255}; Color shadesOfSea[10+1]; /* Ten sea shades. */ struct rgbColor darkSeaColor = {0, 60, 120, 255}; struct rgbColor lightSeaColor = {200, 220, 255, 255}; struct hash *hgFindMatches; /* The matches found by hgFind that should be highlighted. */ +struct hash *origHgFindMatches; /* For use with pdf mode that sets hgFindMatches = NULL. + Original searches can use for bigBedLoading, squishy pack, etc. */ struct trackLayout tl; void initTl() /* Initialize layout around small font and a picture about 600 pixels * wide. */ { trackLayoutInit(&tl, cart); } static boolean isTooLightForTextOnWhite(struct hvGfx *hvg, Color color) /* Return TRUE if text in this color would probably be invisible on a white background. */ { struct rgbColor rgbColor = hvGfxColorIxToRgb(hvg, color); @@ -15996,17 +15998,18 @@ /* Read from the cart the string assocated with matches and put the matching items into a hash for highlighting later. */ { char *matchLine = NULL; struct slName *nameList = NULL, *name = NULL; matchLine = cartOptionalString(cart, "hgFind.matches"); if(matchLine == NULL) return; nameList = slNameListFromString(matchLine,','); hgFindMatches = newHash(5); for(name = nameList; name != NULL; name = name->next) { hashAddInt(hgFindMatches, name->name, 1); } slFreeList(&nameList); +origHgFindMatches = hgFindMatches; // can use with pdf mode when hgFindMatches = NULL }