src/hg/hgTables/wiggle.c 1.75

1.75 2009/07/20 23:33:13 angie
In doOutWig, when handling a composite's subtrack table: instead of applying the appropriate subtrack info only to shortLabel and longLabel, keep the whole subtrack tdb. Its type is used below, and we can no longer assume that composite type = subtrack type.
Index: src/hg/hgTables/wiggle.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/wiggle.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -b -B -U 4 -r1.74 -r1.75
--- src/hg/hgTables/wiggle.c	29 May 2009 22:07:01 -0000	1.74
+++ src/hg/hgTables/wiggle.c	20 Jul 2009 23:33:13 -0000	1.75
@@ -635,29 +635,26 @@
 	     table);
 
 maxOut = wigMaxOutput();
 
-
 textOpen();
 
-
 if (track != NULL)
     {
-    shortLabel = track->shortLabel;
-    longLabel = track->longLabel;
     if (!sameString(track->tableName, table) && track->subtracks != NULL)
 	{
 	struct trackDb *tdb = NULL;
 	for (tdb = track->subtracks;  tdb != NULL;  tdb = tdb->next)
 	    {
 	    if (sameString(tdb->tableName, table))
 		{
-		shortLabel = tdb->shortLabel;
-		longLabel = tdb->longLabel;
+		track = tdb;
 		break;
 		}
 	    }
 	}
+    shortLabel = track->shortLabel;
+    longLabel = track->longLabel;
     }
 wigDataHeader(shortLabel, longLabel, NULL, wigOutType);
 
 for (region = regionList; region != NULL; region = region->next)