src/hg/hgTracks/imageV2.c 1.24

1.24 2010/02/13 00:42:33 tdreszer
This work allows separate image fro sideLabels which is necessary for dragScroll off end of an image.
Index: src/hg/hgTracks/imageV2.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/imageV2.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -b -B -U 4 -r1.23 -r1.24
--- src/hg/hgTracks/imageV2.c	12 Feb 2010 21:10:03 -0000	1.23
+++ src/hg/hgTracks/imageV2.c	13 Feb 2010 00:42:33 -0000	1.24
@@ -788,13 +788,14 @@
     if(slice->parentImg != NULL)
         {
         if(imgFile == NULL)
             imgFile = slice->parentImg->file;
-        else if(differentString(imgFile,slice->parentImg->file))
-            {
-            char * name = (imgTrack->name != NULL ? imgTrack->name : imgTrack->tdb != NULL ? imgTrack->tdb->tableName : imgFile);
-            warn("imgTrackAddMapItem(%s) called, but not all slice images are the same for this track.",name);
-            }
+        //else if(differentString(imgFile,slice->parentImg->file))
+        //    {
+        //    char * name = (imgTrack->name != NULL ? imgTrack->name : imgTrack->tdb != NULL ? imgTrack->tdb->tableName : imgFile);
+        //    warn("imgTrackAddMapItem(%s) called, but not all slice images are the same for this track.",name);
+        //    }
+        // Not a valid warning!  Side image and data image may be different!!!
         }
     if(topLeftX     < (slice->offsetX + slice->width-1)
     && bottomRightX > (slice->offsetX + 1)
     && topLeftY     < (slice->offsetY + slice->height-1)
@@ -1225,9 +1226,12 @@
             imgBox->chromStart,imgBox->chromEnd,(imgBox->plusStrand?'+':'-'),
             imgBox->width,imgBox->basesPerPixel,(imgBox->showSideLabel?"Yes":"No"),imgBox->sideLabelWidth,
             (imgBox->showPortal?"Yes":"No"),imgBox->portalStart,imgBox->portalEnd,imgBox->portalWidth);
     indent++;
-    imgShow(&myDy,imgBox->images,"data ",indent);
+    struct image *img;
+    for(img=imgBox->images;img!=NULL;img=img->next)
+        imgShow(&myDy,img,"data ",indent);
+    if(imgBox->bgImg)
     imgShow(&myDy,imgBox->bgImg,"bgnd ",indent);
     if(dy == NULL)
         warn("%s",dyStringCannibalize(&myDy));