25991b71901c630921e51b8123cadcd04ca97479
braney
  Tue Feb 27 15:39:02 2018 -0800
fix brain dead bug I introduced with selecting density mode

diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 285397d..e789ae9 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -4991,33 +4991,34 @@
     printf("<p>");
 return boxed;
 }
 
 void cfgEndBox(boolean boxed)
 // Handle end of box and title for individual track type settings
 {
 if (boxed)
     puts("</td></tr></table>");
 }
 
 void wigOption(struct cart *cart, char *name, char *title, struct trackDb *tdb)
 /* let the user choose to see the track in wiggle mode */
 {
 printf("<BR><BR><B>Display data as a density graph:</B> ");
-char varName[1024];
 boolean option = cartOrTdbBoolean(cart, tdb, "doWiggle", FALSE);
 
+char varName[1024];
+safef(varName, sizeof(varName), "%s.doWiggle", name);
 cgiMakeCheckBox(varName, option);
 printf("<BR>\n");
 char *style = option ? "display:block" : "display:none";
 printf("<DIV ID=\"densGraphOptions\" STYLE=\"%s\">\n", style);
 
 // we need to fool the wiggle dialog into defaulting to autoscale and maximum
 char *origType = tdb->type;
 tdb->type = "bedGraph";
 if (hashFindVal(tdb->settingsHash, AUTOSCALE) == NULL)
     hashAdd(tdb->settingsHash, AUTOSCALE, "on");
 if (hashFindVal(tdb->settingsHash, WINDOWINGFUNCTION) == NULL)
     hashAdd(tdb->settingsHash, WINDOWINGFUNCTION, wiggleWindowingEnumToString( wiggleWindowingMax));
 wigCfgUi(cart,tdb,name,title,TRUE);
 tdb->type = origType;
 printf("</DIV>\n\n");