3c3dd11b3f4eb591b259296ab5dcbfa3bfd30638
larrym
  Thu Aug 18 13:35:03 2011 -0700
always call updateTiming in handleUpdateTrackMap (i.e. even when only updating a single track)
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index df4e722..288b79e 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -2704,33 +2704,30 @@
             $("input[name='l']").val(json.winStart);
             $("input[name='r']").val(json.winEnd);
             if(json.cgiVersion != hgTracks.cgiVersion) {
                 // Must reload whole page because of a new version on the server; this should happen very rarely.
                 // Note that we have already updated position based on the user's action.
                 jQuery('body').css('cursor', 'wait');
 	        document.TrackHeaderForm.submit();
             } else {
                 // We update rows one at a time (updating the whole imgTable at one time doesn't work in IE).
                 for (id in hgTracks.trackDb) {
                     if(!updateTrackImgForId(response, id)) {
                         showWarning("Couldn't parse out new image for id: " + id);
                         //alert("Couldn't parse out new image for id: " + id+"BR"+response);  // Very helpful
                     }
                 }
-                if(hgTracks.measureTiming) {
-                    updateTiming(response);
-                }
                 hgTracks = json;
                 originalPosition = undefined;
                 initVars();
                 afterImgTblReload();
             }
         } else {
             a= /<IMG([^>]+SRC[^>]+id='trackMap[^>]*)>/.exec(response);
             // Deal with a is null
             if(a[1]) {
                     var b = /WIDTH\s*=\s*['"]?(\d+)['"]?/.exec(a[1]);
                     var width = b[1];
                     b = /HEIGHT\s*=\s*['"]?(\d+)['"]?/.exec(a[1]);
                     var height = b[1];
                     b = /SRC\s*=\s*"([^")]+)"/.exec(a[1]);
                     var src = b[1];
@@ -2767,30 +2764,33 @@
             parseMap($map, true);
         } else {
             showWarning("Couldn't parse out map");
         }
     }
     // Parse out new ideoGram url (if available)
     // e.g.: <IMG SRC = "../trash/hgtIdeo/hgtIdeo_hgwdev_larrym_61d1_8b4a80.gif" BORDER=1 WIDTH=1039 HEIGHT=21 USEMAP=#ideoMap id='chrom'>
     // We do this last b/c it's least important.
     var a = /<IMG([^>]+SRC[^>]+id='chrom'[^>]*)>/.exec(response);
     if(a && a[1]) {
         b = /SRC\s*=\s*"([^")]+)"/.exec(a[1]);
         if(b[1]) {
             $('#chrom').attr('src', b[1]);
         }
     }
+    if(hgTracks.measureTiming) {
+        updateTiming(response);
+    }
     if(this.disabledEle) {
         this.disabledEle.attr('disabled', '');
     }
     if(this.loadingId) {
         hideLoadingImage(this.loadingId);
     }
     jQuery('body').css('cursor', '');
 }
 
 function handleViewImg(response, status)
 { // handles view image response, which must get new image without imageV2 gimmickery
     jQuery('body').css('cursor', '');
     var str = "<IMG[^>]*SRC='([^']+)'";
     var reg = new RegExp(str);
     a = reg.exec(response);