3e1c9e1a4f3d10821478ae0d99f82bc071f20117
tdreszer
  Thu Jan 26 13:27:05 2012 -0800
configurable off should be supported at composite/view and subtrack level.  Before this it was only at subtrack level.
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 16ef068..ad1a4fc 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -3748,32 +3748,39 @@
     if (tdbIsComposite(tdb)                       // called for the composite
     && !tdbIsCompositeView(tdb->subtracks)        // and there is no view level
     && slCount(tdb->subtracks) == 1)              // and there is only one subtrack
         {
         //warn("What do you mean by having a composite (%s) with only one subtrack (%s) ???",tdb->track,tdb->subtracks->track);
         tdb = tdb->subtracks; // show subtrack cfg instead
         prefix = tdb->track;
         }
     else if (tdbIsSubtrack(tdb)                   // called with subtrack
          && tdbIsCompositeView(tdb->parent)       // subtrack has view
          && differentString(prefix,tdb->track)    // and this has been called FOR the view
          && slCount(tdb->parent->subtracks) == 1) // and view has only one subtrack
         prefix = tdb->track; // removes reference to view level
     }
 #endif///def SUBTRACK_CFG
-// composite without view should pass in subtrack as example track!
-if (tdbIsComposite(tdb) && !tdbIsCompositeView(tdb->subtracks))
+
+// Cfg could be explicitly blocked, but if tdb is example subtrack
+// then blocking should have occurred before we got here.
+if (!tdbIsSubtrack(tdb) && trackDbSettingBlocksConfiguration(tdb))
+    return;
+
+// composite/view must pass in example subtrack
+// NOTE: if subtrack types vary then there shouldn't be cfg at composite/view level!
+while (tdb->subtracks)
     tdb = tdb->subtracks;
 
 switch(cType)
     {
     case cfgBedScore:
                         {
                         char *scoreMax = trackDbSettingClosestToHome(tdb, SCORE_FILTER _MAX);
                         int maxScore = (scoreMax ? sqlUnsigned(scoreMax):1000);
                         scoreCfgUi(db, cart,tdb,prefix,title,maxScore,boxed);
                         }
                         break;
     case cfgPeak:
                         encodePeakCfgUi(cart,tdb,prefix,title,boxed);
                         break;
     case cfgWig:        wigCfgUi(cart,tdb,prefix,title,boxed);
@@ -6249,30 +6256,33 @@
 
 char configurable[membersOfView->count];
 memset(configurable,cfgNone,sizeof(configurable));
 int firstOpened = -1;
 boolean makeCfgRows = FALSE;
 struct trackDb **matchedViewTracks = needMem(sizeof(struct trackDb *) * membersOfView->count);
 
 for (ix = 0; ix < membersOfView->count; ix++)
     {
     if (membersOfView->subtrackList     != NULL
     &&  membersOfView->subtrackList[ix] != NULL)
         {
         struct trackDb *subtrack = membersOfView->subtrackList[ix]->val;
         matchedViewTracks[ix] = subtrack->parent;
         configurable[ix] = (char)cfgTypeFromTdb(subtrack, TRUE);
+        if (configurable[ix] != cfgNone && trackDbSettingBlocksConfiguration(subtrack))
+            configurable[ix]  = cfgNone;
+
         if(configurable[ix] != cfgNone)
             {
             if(firstOpened == -1)
                 {
                 safef(varName, sizeof(varName), "%s.showCfg", matchedViewTracks[ix]->track);
                 if(cartUsualBoolean(cart,varName,FALSE)) // No need for closestToHome: view level input
                     firstOpened = ix;
                 }
             makeCfgRows = TRUE;
             }
         }
     }
 
 toLowerN(membersOfView->groupTitle, 1);
 printf("<B>Select %s</B> (<A HREF='../goldenPath/help/multiView.html' title='Help on views' TARGET=_BLANK>help</A>):\n", membersOfView->groupTitle);