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

diff --git src/hg/hgTracks/imageV2.c src/hg/hgTracks/imageV2.c
index 123a3669980..eb51c3cc768 100644
--- src/hg/hgTracks/imageV2.c
+++ src/hg/hgTracks/imageV2.c
@@ -4,30 +4,31 @@
  * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
 #include "common.h"
 #include "hPrint.h"
 #include "chromInfo.h"
 #include "hdb.h"
 #include "hui.h"
 #include "jsHelper.h"
 #include "cheapcgi.h"
 #include "htmshell.h"
 #include "imageV2.h"
 #include "hgTracks.h"
 #include "hgConfig.h"
 #include "regexHelper.h"
 #include "customComposite.h"
 #include "chromAlias.h"
+#include "trackHub.h"
 
 // Note: when right-click View image (or pdf output) then theImgBox==NULL, so it will be rendered as a single simple image
 struct imgBox   *theImgBox   = NULL; // Make this global for now to avoid huge rewrite
 struct imgTrack *curImgTrack = NULL; // Make this global for now to avoid huge rewrite
 
 /////////////////////////
 // FLAT TRACKS
 // A simplistic way of flattening the track list before building the image
 // NOTE: Strategy is NOT to use imgBox->imgTracks, since this should be independednt of imageV2
 /////////////////////////
 void flatTracksAdd(struct flatTracks **flatTracks,struct track *track,struct cart *cart, struct slName *orderedWiggles)
 // Adds one track into the flatTracks list
 {
 struct flatTracks *flatTrack;
 AllocVar(flatTrack);
@@ -1894,32 +1895,44 @@
         if (centerSlice != NULL)
             height -= centerSlice->height;
         }
 
     hPrintf("  <p id='p_%s' style='height:%dpx;",name,height);
     if (slice->type==stButton)
         {
         char *trackName = imgTrack->name;
         if (trackName == NULL)
             {
             struct trackDb * tdb = imgTrack->tdb;
             if (tdbIsCompositeChild(tdb))
                 tdb = tdbGetComposite(tdb);
             trackName = tdb->track;
             }
-        hPrintf(" width:9px; display:none;' class='%s %sbtn btnN'></p>",
-                trackName,(slice->link == NULL ? "inset " : ""));
+
+        // make quickLifted tracks have a green left button
+        struct trackDb *tdb = imgTrack->tdb;
+        struct trackHub *tHub = NULL;
+        char *grpName = NULL;
+        if (tdb != NULL)
+            grpName = tdb->grp;
+        if (grpName != NULL)
+            tHub = grabHashedHub(grpName);
+        char *btnType = "btn";
+        if ((tHub != NULL) && startsWith("Quicklift", tHub->longLabel))
+            btnType = "btnGreen";
+        hPrintf(" width:9px; display:none;' class='%s %sbtn btnN %s'></p>",
+                trackName,(slice->link == NULL ? "inset " : ""), btnType);
         }
     else
         hPrintf("width:%dpx;'></p>",slice->width);
     }
 }
 
 // FF does not support newline code and '...' looks bad without newlines
 #define NEWLINE_ENCODED " &#x0A;"
 #define NEWLINE_NOT_SUPPORTED " - "
 #define NEWLINE_TO_USE(browser) ((browser) == btFF ? NEWLINE_NOT_SUPPORTED : NEWLINE_ENCODED)
 #define ELLIPSIS_TO_USE(browser) ((browser) == btFF ? "" : "...")
 
 static void sliceAndMapDraw(struct imgBox *imgBox,struct imgTrack *imgTrack,
                             enum sliceType sliceType,char *name,boolean scrollHandle, struct jsonElement *ele)
 // writes a slice of an image and any assocated image map as HTML