2d1879fd9e4780eb0780cb4833bde119166ec8cc braney Wed Mar 16 15:33:55 2011 -0700 fix #3224 . Custom track hgc clicks expect to have an extra field with the table name which isn't used by the bam click handler, but not having anything there breaks hgc. diff --git src/hg/hgTracks/bamTrack.c src/hg/hgTracks/bamTrack.c index 503e44b..6b47344 100644 --- src/hg/hgTracks/bamTrack.c +++ src/hg/hgTracks/bamTrack.c @@ -693,38 +693,48 @@ int fontHeight = mgFontLineHeight(font); if (isCenterLabelIncluded(tg)) yOff += fontHeight; hvGfxTextRight(hvg, xOff, yOff, width, tg->lineHeight, color, font, tg->shortLabel); } return; } static void doMapBoxPerRow(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, enum trackVisibility vis) { int fontHeight = mgFontLineHeight(font); int numRows = tg->height / fontHeight; +struct customTrack *ct = tg->customPt; +char itemBuffer[1024]; + +if (ct) + // this should have the trash file name instead of spacer + // but the click handler doesn't use it anyway + safef(itemBuffer, sizeof itemBuffer, "%s %s","spacer","zoom in"); +else + safef(itemBuffer, sizeof itemBuffer, "zoom in"); while(numRows--) { char buffer[1024]; + safef(buffer, sizeof buffer, "Too many items in display. Zoom in to click on items. (%d)",numRows); mapBoxHc(hvg, seqStart, seqEnd, xOff, yOff, width, fontHeight, - tg->track, "zoom in", + tg->track, itemBuffer, buffer); yOff += fontHeight; } // just do this once tg->customInt = 0; } void bamLinkedFeaturesSeriesDraw(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, enum trackVisibility vis) /* Draw bam linked features items. */ { linkedFeaturesSeriesDraw(tg, seqStart, seqEnd, hvg, xOff, yOff, width,