ae9de008e7786f3fccd9f52db6514540b1c995d5
kent
  Thu Mar 31 05:52:43 2011 -0700
Smoothing out the handling of the track->children pointer and track->subtracks pointer so that it works the same in hgTrackUi as elsewhere.  The children pointers are set after pruning the track list for ones where the data table is not available.
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 96fd4d8..6cc3c41 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -7022,33 +7022,34 @@
 if (!tdbIsSuperTrack(tdb))
     return FALSE;
 
 /* determine if supertrack is show/hide */
 boolean show = FALSE;
 char *setting =
         cartUsualString(cart, tdb->track, tdb->isShow ? "show" : "hide");
 if (sameString("show", setting))
     show = TRUE;
 
 /* Determine if any tracks in supertrack are visible; if not,
  * the 'show' is grayed out */
 if (show && (visibleChild == -1))
     {
     visibleChild = 0;
-    struct trackDb *cTdb;
-    for (cTdb = tdb->subtracks; cTdb != NULL; cTdb = tdb->next)
+    struct slRef *childRef;
+    for ( childRef = tdb->children; childRef != NULL; childRef = childRef->next)
         {
+	struct trackDb *cTdb = childRef->val;
         cTdb->visibility =
                 hTvFromString(cartUsualString(cart, cTdb->track,
                                       hStringFromTv(cTdb->visibility)));
         if (cTdb->visibility != tvHide)
             visibleChild = 1;
         }
     }
 hideShowDropDownWithClassAndExtra(tdb->track, show, (show && visibleChild) ?
                             "normalText visDD" : "hiddenText visDD",extra);
 return TRUE;
 }
 
 int tvConvertToNumericOrder(enum trackVisibility v)
 {
 return ((v) == tvFull   ? 4 : \