ae09c0590da3e36fdf30c30fcec71c6aa3374663
braney
  Tue Jul 8 16:32:42 2025 -0700
fix bugs in quickLift refs #35609

diff --git src/hg/hgGene/rnaStructure.c src/hg/hgGene/rnaStructure.c
index 69a63246d98..adc213cfeae 100644
--- src/hg/hgGene/rnaStructure.c
+++ src/hg/hgGene/rnaStructure.c
@@ -34,30 +34,32 @@
 if (sqlTableExists(conn, "foldUtr5") && 
 	sqlRowExists(conn, "foldUtr5", "name", geneId))
     return TRUE;
 return FALSE;
 }
 
 static void rnaStructurePrint(struct section *section, 
 	struct sqlConnection *conn, char *geneId)
 /* Print out rnaStructure table. */
 {
 static boolean firstTime = TRUE;
 static char *names[2] = 
 	{"5' UTR", "3' UTR"};
 static char *tables[2] = {"foldUtr5", "foldUtr3"};
 int side;
+char *tableName = cartUsualString(cart, hggType, NULL);
+char *geneName = cartUsualString(cart, hggGene, NULL);
 
 if (firstTime)
     {
     rnaTrashDirsInit(tables, ArraySize(tables));
     firstTime = FALSE;
     }
 
 webPrintLinkTableStart();
 webPrintLabelCell("Region");
 webPrintLabelCell("Fold Energy");
 webPrintLabelCell("Bases");
 webPrintLabelCell("Energy/Base");
 webPrintWideCenteredLabelCell("Display As", 3);
 
 char *rnaPlotPath = cfgOptionDefault("rnaPlotPath", "../cgi-bin/RNAplot");
@@ -126,51 +128,55 @@
 	webPrintLinkCell(names[side]);
 	webPrintLinkCellStart();
 	hPrintf("%1.2f", fold.energy);
 	webPrintLinkCellEnd();
 	webPrintLinkCellStart();
 	hPrintf("%d", bases);
 	webPrintLinkCellEnd();
 	webPrintLinkCellStart();
 	hPrintf("%1.3f", fold.energy/bases);
 	webPrintLinkCellEnd();
 
         if (plotDone)
             {
             /* Print link to png image. */
             webPrintLinkCellStart();
-            hPrintf("<A HREF=\"%s?%s&%s=%s&%s=%s&%s=%s\" class=\"toc\" TARGET=_blank>",
+            hPrintf("<A HREF=\"%s?%s&%s=%s&%s=%s&%s=%s&%s=%s&%s=%s\" class=\"toc\" TARGET=_blank>",
                 geneCgi, cartSidUrlString(cart), 
+                hggType, tableName,
+                hggGene, geneName,
                 hggMrnaFoldRegion, table,
                 hggMrnaFoldPs, psName,
                 hggDoRnaFoldDisplay, "picture");
             hPrintf(" Picture ");
             hPrintf("</A>");
             webPrintLinkCellEnd();
 
             /* Print link to PostScript. */
             webPrintLinkCellStart();
             hPrintf("<A HREF=\"%s\" class=\"toc\">", psName);
             hPrintf(" PostScript ");
             hPrintf("</A>");
             webPrintLinkCellEnd();
             }
 
 	/* Print link to text. */
 	webPrintLinkCellStart();
-	hPrintf("<A HREF=\"%s?%s&%s=%s&%s=%s\" class=\"toc\" TARGET=_blank>",
+	hPrintf("<A HREF=\"%s?%s&%s=%s&%s=%s&%s=%s&%s=%s\" class=\"toc\" TARGET=_blank>",
 	    geneCgi, cartSidUrlString(cart), 
+            hggType, tableName,
+            hggGene, geneName,
 	    hggMrnaFoldRegion, table,
 	    hggDoRnaFoldDisplay, "text");
 	hPrintf(" Text ");
 	hPrintf("</A>");
 	webPrintLinkCellEnd();
 	}
     sqlFreeResult(&sr);
     }
 webPrintLinkTableEnd();
 hPrintf("<BR>The RNAfold program from the ");
 hPrintf("<A HREF=\"http://www.tbi.univie.ac.at/~ivo/RNA/\" TARGET=_blank>");
 hPrintf("Vienna RNA Package</A> is used to perform the ");
 hPrintf("secondary structure predictions and folding calculations. ");
 hPrintf("The estimated folding energy is in kcal/mol.  The more ");
 hPrintf("negative the energy, the more secondary structure the RNA ");