diff --git a/js/main.js b/js/main.js index 10a1e012..f72fde22 100644 --- a/js/main.js +++ b/js/main.js @@ -319,6 +319,14 @@ class App extends React.Component { // If we're in compare mode and recieve an update to an environment // that is selected that isn't from the compare output, we need to // reload the compare output + if(cmd.envID !== undefined && cmd.envID !== this.state.envID){ + // If env of the window is not same to the current env then ignore it + break; + } + if(cmd.contentID === 'compare_legend' && this.state.envIDs.length < 2){ + // if compare_legend comes and only one env is selected then ignore it + break; + } if (this.state.envIDs.length > 1 && cmd.has_compare !== true) { this.postForEnv(this.state.envIDs); } else { diff --git a/py/visdom/utils/server_utils.py b/py/visdom/utils/server_utils.py index 6a7c3d40..2d49fc06 100644 --- a/py/visdom/utils/server_utils.py +++ b/py/visdom/utils/server_utils.py @@ -184,7 +184,8 @@ def window(args): "inflate": opts.get("inflate", True), "width": opts.get("width"), "height": opts.get("height"), - "contentID": get_rand_id(), # to detected updated windows + "envID": args.get("eid"), + "contentID": get_rand_id(), # to detected updated windows } if ptype == "image_history":