src/hg/lib/customFactory.c 1.108

1.108 2009/11/05 18:48:36 angie
Handle chromosomes setting in customTrackUpdateFromSettings, to avoid hgTracks loading overhead for a custom track that has no data on the current chrom.
Index: src/hg/lib/customFactory.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/customFactory.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -b -B -U 4 -r1.107 -r1.108
--- src/hg/lib/customFactory.c	3 Nov 2009 00:29:08 -0000	1.107
+++ src/hg/lib/customFactory.c	5 Nov 2009 18:48:36 -0000	1.108
@@ -1671,8 +1671,10 @@
 	readInGulp(val, &track->tdb->html, NULL);
         track->htmlFile = cloneString(val);
         }
     }
+if ((val = hashFindVal(hash, "chromosomes")) != NULL)
+    sqlStringDynamicArray(val, &track->tdb->restrictList, &track->tdb->restrictCount);
 
 if ((val = hashFindVal(hash, "htmlUrl")) != NULL)
     {
     /* adding error trapping because various net.c functions can errAbort */