79714a6077e461830c702fa183d32bc13ac764c0 larrym Tue Feb 7 08:27:34 2012 -0800 handle case in doGenomicDna where we were not printing the NO_RESULTS message (see #6873) diff --git src/hg/hgTables/seqOut.c src/hg/hgTables/seqOut.c index 2299f75..bb419b5 100644 --- src/hg/hgTables/seqOut.c +++ src/hg/hgTables/seqOut.c @@ -247,43 +247,40 @@ hPrintf(" "); cgiMakeButton(hgtaDoMainPage, "cancel"); hPrintf(""); } cgiDown(0.9); htmlClose(); } void doGenomicDna(struct sqlConnection *conn) /* Get genomic sequence (UI has already told us how). */ { struct region *region, *regionList = getRegions(); struct hTableInfo *hti = getHti(database, curTable, conn); int fieldCount; textOpen(); -boolean gotResult = FALSE; +int resultCount = 0; for (region = regionList; region != NULL; region = region->next) { struct lm *lm = lmInit(64*1024); struct bed *bedList = cookedBedList(conn, curTable, region, lm, &fieldCount); if (bedList != NULL) - { - gotResult = TRUE; - hgSeqBed(database, hti, bedList); - } + resultCount += hgSeqBed(database, hti, bedList); lmCleanup(&lm); } -if (!gotResult) +if (!resultCount) hPrintf(NO_RESULTS); } void doGenePredSequence(struct sqlConnection *conn) /* Output genePred sequence. */ { char *type = cartString(cart, hgtaGeneSeqType); if (sameWord(type, "protein")) { if (doGalaxy() && !cgiOptionalString(hgtaDoGalaxyQuery)) sendParamsToGalaxy(hgtaDoGenePredSequence, "submit"); else doGenePredNongenomic(conn, 1); }