fc5e180efadc883ee6378c0090aba4cd5d1b94b0
fanhsu
  Tue Jul 5 10:28:50 2011 -0700
Corrected a subtle error introduced by adding gene symbol filter for OMIM Genes.
diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c
index e10c3db..e83cf20 100644
--- src/hg/hgTracks/simpleTracks.c
+++ src/hg/hgTracks/simpleTracks.c
@@ -10902,46 +10902,51 @@
     else
     	{
     	result = 0;
 	}
     }
 else
     result = targetClass;
 hFreeConn(&conn);
 return(result);
 }
 
 boolean doThisOmimEntry(struct track *tg, char *omimId)
 /* check if the specific class of this OMIM entry is selected by the user */
 {
 boolean doIt;
-
+boolean gotClassLabel;
 char labelName[255];
 boolean doClass1 = FALSE;
 boolean doClass2 = FALSE;
 boolean doClass3 = FALSE;
 boolean doClass4 = FALSE;
 boolean doOthers = FALSE;
 
 struct hashEl *omimLocationLabels;
 struct hashEl *label;
 
 safef(labelName, sizeof(labelName), "%s.label", tg->table);
 omimLocationLabels = cartFindPrefix(cart, labelName);
 
-/* if user has not made selection(s) from the filter, enable every item */
-if (omimLocationLabels == NULL) return(TRUE);
+gotClassLabel = FALSE;
+for (label = omimLocationLabels; label != NULL; label = label->next)
+	{
+	if (strstr(label->name, "class") != NULL) gotClassLabel = TRUE;
+	}
+/* if user has not made selection(s) from the phenotype class filter, enable every item */
+if (!gotClassLabel) return(TRUE);	
 
 /* check which classes have been selected */
 for (label = omimLocationLabels; label != NULL; label = label->next)
     {
     if (endsWith(label->name, "class1") && differentString(label->val, "0"))
 	{
 	doClass1 = TRUE;
 	}
     if (endsWith(label->name, "class2") && differentString(label->val, "0"))
 	{
 	doClass2 = TRUE;
 	}
     if (endsWith(label->name, "class3") && differentString(label->val, "0"))
 	{
 	doClass3 = TRUE;