Index: src/hg/lib/hui.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hui.c,v
retrieving revision 1.256
retrieving revision 1.257
diff -b -B -U 4 -r1.256 -r1.257
--- src/hg/lib/hui.c	5 Feb 2010 18:55:25 -0000	1.256
+++ src/hg/lib/hui.c	5 Feb 2010 20:08:42 -0000	1.257
@@ -4596,8 +4596,11 @@
 {
 bool lowerFirstChar = TRUE;
 int i;
 char option[MAX_SP_SIZE];
+char *viewString = NULL;
+
+subgroupFind(tdb, "view", &viewString);
 
 boxed = cfgBeginBoxAndTitle(tdb, boxed, title);
 
 char *defaultCodonSpecies = trackDbSetting(tdb, SPECIES_CODON_DEFAULT);
@@ -4638,17 +4641,24 @@
 if (isWigMafProt)
     puts("<B>Multiple alignment amino acid-level:</B><BR>" );
 else
     puts("<B>Multiple alignment base-level:</B><BR>" );
-safef(option, sizeof option, "%s.%s", name, MAF_DOT_VAR);
+
+if (viewString != NULL)
+    safef(option, sizeof option, "%s.%s.%s", name, viewString, MAF_DOT_VAR);
+else
+    safef(option, sizeof option, "%s.%s", name, MAF_DOT_VAR);
 cgiMakeCheckBox(option, cartCgiUsualBoolean(cart, option, FALSE));
 
 if (isWigMafProt)
     puts("Display amino acids identical to reference as dots<BR>" );
 else
     puts("Display bases identical to reference as dots<BR>" );
 
-safef(option, sizeof option, "%s.%s", name, MAF_CHAIN_VAR);
+if (viewString != NULL)
+    safef(option, sizeof option, "%s.%s.%s", name, viewString, MAF_CHAIN_VAR);
+else
+    safef(option, sizeof option, "%s.%s", name, MAF_CHAIN_VAR);
 cgiMakeCheckBox(option, cartCgiUsualBoolean(cart, option, TRUE));
 
 char *irowStr = trackDbSetting(tdb, "irows");
 boolean doIrows = (irowStr == NULL) || !sameString(irowStr, "off");
@@ -4678,10 +4688,9 @@
 	}
     cgiMakeDropList(SPECIES_CODON_DEFAULT, nodeNames, i,
 	cartUsualString(cart, SPECIES_CODON_DEFAULT, defaultCodonSpecies));
     puts("<br>");
-    char *viewString;
-    if (subgroupFind(tdb, "view", &viewString))
+    if (viewString != NULL)
 	safef(buffer, sizeof(buffer), "%s.%s.codons",name, viewString);
     else
 	safef(buffer, sizeof(buffer), "%s.codons",name);
     cartMakeRadioButton(cart, buffer,"codonNone", "codonDefault");

