a7ba9fbaef7ac480d8afa54b1a7d46eb3f5ee2c8
kate
  Thu Mar 31 18:27:38 2016 -0700
Another fix for compatibility with multi-region. refs #15645

diff --git src/hg/hgTracks/gtexTracks.c src/hg/hgTracks/gtexTracks.c
index 15d3a87..5aa95c3 100644
--- src/hg/hgTracks/gtexTracks.c
+++ src/hg/hgTracks/gtexTracks.c
@@ -1035,36 +1035,40 @@
 
 static int gtexGeneItemEnd(struct track *tg, void *item)
 /* Return end chromosome coordinate of item, including graph */
 {
 struct gtexGeneInfo *geneInfo = (struct gtexGeneInfo *)item;
 struct gtexGeneBed *geneBed = geneInfo->geneBed;
 double scale = scaleForWindow(insideWidth, winStart, winEnd);
 int graphWidth = gtexGraphWidth(tg, geneInfo);
 return max(geneBed->chromEnd, max(winStart, geneBed->chromStart) + graphWidth/scale);
 }
 
 static void gtexGenePreDrawItems(struct track *tg, int seqStart, int seqEnd,
                                 struct hvGfx *hvg, int xOff, int yOff, int width,
                                 MgFont *font, Color color, enum trackVisibility vis)
 {
-if (vis == tvPack || vis == tvFull)
+if (vis == tvSquish || vis == tvDense)
     {
-    tg->nonPropDrawItemAt = gtexGeneNonPropDrawAt;
-    tg->nonPropPixelWidth = gtexGeneNonPropPixelWidth;
+    // NonProp routines not relevant to these modes, and they interfere
+    // NOTE: they must be installed by gtexGeneMethods() for pack mode
+    tg->nonPropDrawItemAt = NULL;
+    tg->nonPropPixelWidth = NULL;
     }
 }
 
 void gtexGeneMethods(struct track *tg)
 {
 tg->drawItemAt = gtexGeneDrawAt;
 tg->preDrawItems = gtexGenePreDrawItems;
 tg->loadItems = gtexGeneLoadItems;
 tg->mapItem = gtexGeneMapItem;
 tg->itemName = gtexGeneItemName;
 tg->mapItemName = gtexGeneItemName;
 tg->itemHeight = gtexGeneItemHeight;
 tg->itemStart = gtexGeneItemStart;
 tg->itemEnd = gtexGeneItemEnd;
 tg->totalHeight = gtexGeneTotalHeight;
+tg->nonPropDrawItemAt = gtexGeneNonPropDrawAt;
+tg->nonPropPixelWidth = gtexGeneNonPropPixelWidth;
 }