adb1f53675fa195494116df6ccc6d9640c4d2754 larrym Wed Jan 25 13:12:01 2012 -0800 add code in wigCfgUi to handle case where tdb isn't at parent level; fixes missing control in hgTrackUi (#6707) diff --git src/hg/lib/hui.c src/hg/lib/hui.c index dd819d9..8e52270 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -4473,39 +4473,44 @@ wigFetchMinMaxYWithCart(cart, tdb, name, &minY, &maxY, &tDbMinY, &tDbMaxY, wordCount, words); freeMem(typeLine); wigFetchTransformFuncWithCart(cart,tdb,name, &transformFunc); wigFetchAlwaysZeroWithCart(cart,tdb,name, &alwaysZero); wigFetchHorizontalGridWithCart(cart,tdb,name, &horizontalGrid); wigFetchAutoScaleWithCart(cart,tdb,name, &autoScale); wigFetchGraphTypeWithCart(cart,tdb,name, &lineBar); wigFetchWindowingFunctionWithCart(cart,tdb,name, &windowingFunction); wigFetchSmoothingWindowWithCart(cart,tdb,name, &smoothingWindow); wigFetchYLineMarkWithCart(cart,tdb,name, &yLineMarkOnOff); wigFetchYLineMarkValueWithCart(cart,tdb,name, &yLineMark); printf(""); -char *aggregate = trackDbSetting(tdb, "aggregate"); -if (aggregate != NULL && tdb->subtracks) +boolean parentLevel = isNameAtParentLevel(tdb, name); +if(parentLevel) + { + assert(tdb->parent != NULL); + char *aggregate = trackDbSetting(tdb->parent, "aggregate"); + if (aggregate != NULL && parentLevel) { - char *aggregateVal = cartOrTdbString(cart, tdb, "aggregate", NULL); + char *aggregateVal = cartOrTdbString(cart, tdb->parent, "aggregate", NULL); printf(""); } + } printf(""); printf("
Overlay method:"); safef(option, sizeof(option), "%s.%s", name, AGGREGATE); aggregateDropDown(option, aggregateVal); puts("
Type of graph:"); snprintf( option, sizeof(option), "%s.%s", name, LINEBAR ); wiggleGraphDropDown(option, lineBar); if(boxed) { printf(""); printf("Graph configuration help",WIGGLE_HELP_PAGE); } puts("
Track height:"); snprintf(option, sizeof(option), "%s.%s", name, HEIGHTPER ); cgiMakeIntVarWithLimits(option, defaultHeight, "Track height",0, minHeightPixels, maxHeightPixels); printf("pixels (range: %d to %d)",