src/hg/lib/hui.c 1.200

1.200 2009/05/22 19:37:05 tdreszer
Need to not limit min/max default score if 'NO_VALUE' was passed in.
Index: src/hg/lib/hui.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hui.c,v
retrieving revision 1.199
retrieving revision 1.200
diff -b -B -U 4 -r1.199 -r1.200
--- src/hg/lib/hui.c	21 May 2009 20:30:50 -0000	1.199
+++ src/hg/lib/hui.c	22 May 2009 19:37:05 -0000	1.200
@@ -2561,9 +2561,9 @@
     }
 return dyStringCannibalize(&dyClause);
 }
 
-static void filterBySetCfgUi(struct trackDb *tdb, filterBy_t *filterBySet)
+void filterBySetCfgUi(struct trackDb *tdb, filterBy_t *filterBySet)
 /* Does the UI for a list of filterBy structure */
 {
 if(filterBySet == NULL)
     return;
@@ -3486,12 +3486,12 @@
     deMin = cartOptionalStringClosestToHome(cart, tdb,FALSE,scoreLimitName);
     if(deMin != NULL)
         *min = atoi(deMin);
     }
-if(min && limitMin && *min < *limitMin) *min = *limitMin; // defaults within range
-if(min && limitMax && *min > *limitMax) *min = *limitMax;
-if(max && limitMax && *max > *limitMax) *max = *limitMax;
-if(max && limitMin && *max < *limitMin) *max = *limitMin;
+if(min && limitMin && *min != NO_VALUE && *min < *limitMin) *min = *limitMin; // defaults within range
+if(min && limitMax && *min != NO_VALUE && *min > *limitMax) *min = *limitMax;
+if(max && limitMax && *max != NO_VALUE && *max > *limitMax) *max = *limitMax;
+if(max && limitMin && *max != NO_VALUE && *max < *limitMin) *max = *limitMin;
 }
 
 static void getScoreFloatRangeFromCart(struct cart *cart, struct trackDb *tdb, char *scoreName,
                                    double *limitMin,double *limitMax,double*min,double*max)