90575b28d8d97732503671e4c5c80f7fbf2d3ac2 tdreszer Tue Oct 11 13:57:16 2011 -0700 With subCfg, when only one subtrack, highlevel shouuld show subtrack controls, so that rightClick and subCfg work together. diff --git src/hg/lib/trackDbCustom.c src/hg/lib/trackDbCustom.c index a1e877b..487bf8e 100644 --- src/hg/lib/trackDbCustom.c +++ src/hg/lib/trackDbCustom.c @@ -745,43 +745,47 @@ else if (startsWith("psl", type)) cType = cfgPsl; else if (sameWord("vcfTabix",type)) cType = cfgVcf; // TODO: Only these are configurable so far if(cType == cfgNone && warnIfNecessary) { if(!startsWith("bed ", type) && !startsWith("bigBed", type) && subgroupFind(tdb,"view",NULL)) warn("Track type \"%s\" is not yet supported in multi-view composites for %s.",type,tdb->track); } return cType; } -int configurableByPopup(struct trackDb *tdb, eCfgType cfgTypeIfKnown) +int configurableByAjax(struct trackDb *tdb, eCfgType cfgTypeIfKnown) // Is this track configurable by right-click popup, or in hgTrackUi subCfg? -// returns 0 = no; <0=explicitly blocked; >0=allowed and will be cfgType +// returns 0 = no; <0=explicitly blocked; >0=allowed and will be cfgType if determined { +if (tdbIsMultiTrackSubtrack(tdb)) + return cfgNone; // multitrack subtracks are never allowed to be separately configured. int ctPopup = (int)cfgTypeIfKnown; -if (!ctPopup) +if (ctPopup <= cfgNone) ctPopup = (int)cfgTypeFromTdb(tdb,FALSE); +if (ctPopup <= cfgNone && !tdbIsSubtrack(tdb)) // subtracks must receive CfgType! + ctPopup = cfgUndetermined; // cfgTypeFromTdb() does not work for every case. -if (ctPopup > 0) +if (ctPopup > cfgNone) { if (regexMatch(tdb->track, "^snp[0-9]+") // Special cases to be removed || regexMatch(tdb->track, "^cons[0-9]+way") // (matches logic in json setup in imageV2.c) - || regexMatch(tdb->track, "^multiz") + || regexMatch(tdb->track, "^multiz") // NOTE: wigMaf is using non-standard view level naming methods so isn't configurable by ajax yet || startsWith("hapmapSnps", tdb->track) || startsWith("hapmapAlleles", tdb->track) || SETTING_IS_OFF(trackDbSettingClosestToHome(tdb, "configureByPopup"))) ctPopup *= -1; } return ctPopup; } char *trackDbSetting(struct trackDb *tdb, char *name) /* Look for a trackDb setting from lowest level on up chain of parents. */ { struct trackDb *generation; char *trackSetting = NULL; for (generation = tdb; generation != NULL; generation = generation->parent) {