404eaf627c4529e51663e5c996e9aee8426b78f6 galt Thu Feb 11 22:54:31 2016 -0800 Fixing problem with custom-track bigDataUrl when cloning tracks across windows. diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 4aacb83..dbf4f43 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -7467,46 +7467,48 @@ windows->trackList = trackList; // save current track list in window struct window *window; for (window=windows; window->next; window=window->next) { struct track *newTrackList = NULL; for (track = trackList; track != NULL; track = track->next) { track->nextWindow = NULL; //if (track->visibility != tvHide) // Unable to use this optimization at present { struct track *copy; AllocVar(copy); memmove(copy,track,sizeof(struct track)); copy->next = NULL; + copy->bbiFile = NULL; // bigDataUrl custom tracks have already been opened, will re-open for other windows. copy->nextWindow = NULL; copy->prevWindow = track; slAddHead(&newTrackList, copy); track->nextWindow = copy; // copy subtracks. copy->subtracks = NULL; struct track *subtrack; for (subtrack = track->subtracks; subtrack != NULL; subtrack = subtrack->next) { //if (subtrack->visibility != tvHide) // Unable to use this optimization at present { struct track *subcopy; AllocVar(subcopy); memmove(subcopy,subtrack,sizeof(struct track)); subcopy->next = NULL; + subcopy->bbiFile = NULL; // bigDataUrl custom tracks have already been opened, will re-open for other windows. subcopy->nextWindow = NULL; subcopy->prevWindow = subtrack; slAddHead(©->subtracks, subcopy); subtrack->nextWindow = subcopy; } } slReverse(©->subtracks); //warn("%s track subs: %d copy subs: %d", track->track, slCount(track->subtracks), slCount(copy->subtracks)); } } slReverse(&newTrackList); trackList = newTrackList; window->next->trackList = trackList; // save new track list in window } trackList = windows->trackList; // restore original track list