d83026b7d8919bc8ad96679a98234aeb1308675e max Mon Sep 7 10:55:13 2026 -0700 hgTracks: say in the track label why a track is showing item density The density-mode labels existed but were only reachable through labelTrackAsFilteredNumber(), which every caller guards with if (filtered), so the note only appeared when a filter had also dropped features and the automatic cases never said anything. labelTrackAsDensityIfActive() now picks a message by cause: one for density the user asked for on the configuration page, one for a window wider than maxWindowCoverage, and one for the three paths that set limitWiggle because there are too many features to draw. It is called once from makeActiveImage() after every path into density mode has settled, over the tracks that will actually be drawn, so hidden tracks keep their plain label. refs #38279 diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h index 6ddccc8bf98..475290643de 100644 --- src/hg/hgTracks/hgTracks.h +++ src/hg/hgTracks/hgTracks.h @@ -1866,35 +1866,43 @@ /* Draw next item buttons and map boxes */ struct spaceSaver *findSpaceSaver(struct track *tg, enum trackVisibility vis); /* Find SpaceSaver in list. Return spaceSaver found or NULL. */ void labelTrackAsFilteredNumber(struct track *tg, unsigned numOut); /* add text to track long label to indicate filter is active and how many items were deleted */ void labelTrackAsFiltered(struct track *tg); /* add text to track long label to indicate filter is active */ void labelTrackAsHideEmpty(struct track *tg); /* add text to track long label to indicate empty subtracks are hidden */ void labelTrackAsDensity(struct track *tg); -/* Add text to track long label to indicate density mode */ +/* Add text to track long label to indicate the user asked for density mode */ void labelTrackAsDensityWindowSize(struct track *tg); /* Add text to track long label to indicate density mode because window size exceeds some threshold */ +void labelTrackAsDensityTooManyItems(struct track *tg); +/* Add text to track long label to indicate we switched to density mode because there were + * too many items to draw one by one */ + +void labelTrackAsDensityIfActive(struct track *tg); +/* If a track is showing item density instead of individual items, say so in the long label, + * distinguishing the density the user asked for from the density we had to impose. */ + void setupHotkeys(boolean gotExtTools); /* setup keyboard shortcuts and a help dialog for it */ void calcWiggleOrdering(struct cart *cart, struct flatTracks *flatTracks); void bedPlusLabelDrawAt(struct track *tg, void *item, struct hvGfx *hvg, int xOff, int y, double scale, MgFont *font, Color color, enum trackVisibility vis); /* Draw a single bed item at position. If vis is full, draw the associated label to the left * of the item. */ Color blackItemNameColor(struct track *tg, void *item, struct hvGfx *hvg); /* Force item name (label) color to black */ void linkedFeaturesMapItem(struct track *tg, struct hvGfx *hvg, void *item, char *itemName, char *mapItemName, int start, int end,