b94c58d2a800d05e38fcc243571156a88600a2b7
larrym
  Wed Apr 18 16:49:28 2012 -0700
fix bug caused by assumption that limitedVis is always set (#7272)
diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h
index 5df17cc..a376122 100644
--- src/hg/hgTracks/hgTracks.h
+++ src/hg/hgTracks/hgTracks.h
@@ -1271,30 +1271,36 @@
 char *getItemDataName(struct track *tg, char *itemName);
 /* Translate an itemName to its itemDataName, using tg->itemDataName if is not
  * NULL. The resulting value should *not* be freed, and it should be assumed
  * that it will only remain valid until the next call of this function.*/
 
 void registerTrackHandler(char *name, TrackHandler handler);
 /* Register a track handling function. */
 
 void doSearchTracks(struct group *groupList);
 
 boolean superTrackHasVisibleMembers(struct trackDb *tdb);
 
 enum trackVisibility limitedVisFromComposite(struct track *subtrack);
 /* returns the subtrack visibility which may be limited by composite with multi-view dropdowns. */
 
+INLINE enum trackVisibility actualVisibility(struct track *track)
+// return actual visibility for this track (limited to limitedVis if appropriate)
+{
+return track->limitedVisSet ? track->limitedVis : track->visibility;
+}
+
 char *getScoreFilterClause(struct cart *cart,struct trackDb *tdb,char *scoreColumn);
 // Returns "score >= ..." extra where clause if one is needed
 
 /* useful for declaring small arrays */
 #define SMALLBUF 128
 #define LARGEBUF 256
 /* and for dyStringNew */
 #define SMALLDYBUF 64
 
 char *trackUrl(char *mapName, char *chromName);
 /* Return hgTrackUi url; chromName is optional. */
 
 void bedDetailCtMethods (struct track *tg, struct customTrack *ct);
 /* Load bedDetail track from custom tracks as bed or linked features */