96df5205e9759f1fc2751c7436a263d9074e4754
tdreszer
  Mon Oct 31 15:50:49 2011 -0700
Little more merge madness
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index f9e10a4..7428436 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -4977,48 +4977,51 @@
 /* Put up UI for filtering bed track based on a score */
 {
 char option[256];
 boolean viewLevel = isNameAtCompositeLevel(tdb,name);
 boolean skipScoreFilter = FALSE;
 boolean bigBed = startsWith("bigBed",tdb->type);
 
 if (!bigBed)  // bigBed filters are limited!
     {
     // Numeric filters are first
     boolean isBoxOpened = FALSE;
     if (numericFiltersShowAll(cart, tdb, &isBoxOpened, boxed, viewLevel, name, title) > 0)
         skipScoreFilter = TRUE;
 
     // Add any multi-selects next
+    filterBy_t *filterBySet = filterBySetGet(tdb,cart,name);
     if(filterBySet != NULL)
         {
         if(!tdbIsComposite(tdb) && cartOptionalString(cart, "ajax") == NULL)
             jsIncludeFile("hui.js",NULL);
 
         if (!isBoxOpened)   // Note filterBy boxes are not double "boxed", if there are no other filters
             printf("<BR>");
         filterBySetCfgUi(cart,tdb,filterBySet,TRUE);
         filterBySetFree(&filterBySet);
         skipScoreFilter = TRUE;
         }
 
     // For no good reason scoreFilter is incompatible with filterBy and or numericFilters
     // FIXME scoreFilter should be implemented inside numericFilters and is currently specificly excluded to avoid unexpected changes
     if (skipScoreFilter)
         {
         if (isBoxOpened)
             cfgEndBox(boxed);
+
+        return; // Cannot have both '*filter' and 'scoreFilter'
         }
     }
 
 boolean scoreFilterOk = (trackDbSettingClosestToHome(tdb, NO_SCORE_FILTER) == NULL);
 boolean glvlScoreMin = (trackDbSettingClosestToHome(tdb, GRAY_LEVEL_SCORE_MIN) != NULL);
 if (! (scoreFilterOk || glvlScoreMin))
     return;
 boxed = cfgBeginBoxAndTitle(tdb, boxed, title);
 
 if (scoreFilterOk)
     {
     int minLimit=0,maxLimit=maxScore,minVal=0,maxVal=maxScore;
     getScoreIntRangeFromCart(cart,tdb,viewLevel,SCORE_FILTER,&minLimit,&maxLimit,&minVal,&maxVal);
 
     boolean filterByRange = trackDbSettingClosestToHomeOn(tdb, SCORE_FILTER _BY_RANGE);