0f0590f5eb6254ddd039868aa5f09f60e44f64b9
kate
  Thu Oct 3 13:48:03 2019 -0700
Append 'filter activated' notice to composites hiding empty subtracks. refs #23365

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 69f96b3..8201dfa 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -10336,26 +10336,28 @@
 if (measureTiming)
     measureTime("Time at end of doMiddle, next up cart write");
 
 if (cartOptionalString(cart, "udcTimeout"))
     {
     warn("The Genome Browser cart currently includes the \"udcTimeout\" string. "
 	"While this is useful for debugging hubs, it may negatively impact "
 	"performance.   To clear this variable, click "
 	"<A HREF='hgTracks?hgsid=%s|url|&udcTimeout=[]'>here</A>.",cartSessionId(cart));
     }
 }
 
 void labelTrackAsFiltered(struct track *tg)
 /* add text to track long label to indicate filter is active */
 {
+#define FILTER_ACTIVATED " (filter activated)"
 char *oldLabel = tg->longLabel;
-tg->longLabel = catTwoStrings(oldLabel, " (filter activated)");
+tg->longLabel = catTwoStrings(oldLabel, FILTER_ACTIVATED);
 
 struct trackDb *tdbComposite = tdbGetComposite(tg->tdb);
 if (tdbComposite != NULL)
     {
     oldLabel = tdbComposite->longLabel;
-    tdbComposite->longLabel = catTwoStrings(oldLabel, " (filter activated)");
+    if (!stringIn(FILTER_ACTIVATED, oldLabel))
+        tdbComposite->longLabel = catTwoStrings(oldLabel, FILTER_ACTIVATED);
     }
 }