src/hg/lib/hui.c 1.202
1.202 2009/05/22 23:04:11 tdreszer
The same NO_VALUE protextion is needed for the float version
Index: src/hg/lib/hui.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hui.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -b -B -U 4 -r1.201 -r1.202
--- src/hg/lib/hui.c 22 May 2009 20:40:26 -0000 1.201
+++ src/hg/lib/hui.c 22 May 2009 23:04:11 -0000 1.202
@@ -3532,12 +3532,12 @@
deMin = cartOptionalStringClosestToHome(cart, tdb,FALSE,scoreLimitName);
if(deMin != NULL)
*min = strtod(deMin,NULL);
}
-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 && (int)(*min) != NO_VALUE && *min < *limitMin) *min = *limitMin; // defaults within range
+if(min && limitMax && (int)(*min) != NO_VALUE && *min > *limitMax) *min = *limitMax;
+if(max && limitMax && (int)(*max) != NO_VALUE && *max > *limitMax) *max = *limitMax;
+if(max && limitMin && (int)(*max) != NO_VALUE && *max < *limitMin) *max = *limitMin;
}
void scoreCfgUi(char *db, struct cart *cart, struct trackDb *tdb, char *name, char *title, int maxScore, boolean boxed)
/* Put up UI for filtering bed track based on a score */