d22aae888b247f7aeedbe0592e431af74c192515
braney
  Thu Jan 30 17:34:20 2020 -0800
fix problem with group autoscale and collections with add or subtract as
merge type.  Also fix long existing problem of using right click to
change merge type from add/subtract to something else.

diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index bd1b521..248ef95 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -4284,31 +4284,33 @@
             if (this.id) {
                 if (newJson.trackDb[this.id]) {
                     var visibility = vis.enumOrder[newJson.trackDb[this.id].visibility];
                     var limitedVis;
                     if (newJson.trackDb[this.id].limitedVis)
                         limitedVis = vis.enumOrder[newJson.trackDb[this.id].limitedVis];
                     if (this.newVisibility && limitedVis && this.newVisibility !== limitedVis)
                         // see redmine 1333#note-9
                         alert("There are too many items to display the track in " +
                                 this.newVisibility + " mode.");
                     var rec = oldJson.trackDb[this.id];
                     rec.limitedVis = newJson.trackDb[this.id].limitedVis;
                     vis.update(this.id, visibility);
                     valid = true;
                 } else {
-                    warn("Invalid hgTracks.trackDb received from the server");
+                    // what got returned from the AJAX request was a different
+                    // set of tracks.  Let's do a reload and hope for the best
+                    imageV2.fullReload();
                 }
             } else {
                 valid = true;
             }
         }
         if (valid) {
             if (imageV2.enabled
             && this.id
             && this.cmd
             && this.cmd !== 'wholeImage'
             && this.cmd !== 'selectWholeGene'
             && !newJson.virtChromChanged) {
                 // Extract <TR id='tr_ID'>...</TR> and update appropriate row in imgTbl;
                 // this updates src in img_left_ID, img_center_ID and img_data_ID
                 // and map in map_data_ID