From 3d8d6953ecc713b80360294437f3999d78cfdf6f Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 31 Jan 2018 23:16:38 +0000 Subject: [PATCH] Avoid unecessary project refresh on branch-switch Fixes #1597 --- editor/js/ui/projects/tab-versionControl.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/editor/js/ui/projects/tab-versionControl.js b/editor/js/ui/projects/tab-versionControl.js index 62746e723..a5353fc95 100644 --- a/editor/js/ui/projects/tab-versionControl.js +++ b/editor/js/ui/projects/tab-versionControl.js @@ -650,10 +650,10 @@ RED.sidebar.versionControl = (function() { // done(error,null); }, 200: function(data) { - RED.projects.refresh(function() { - closeBranchBox(function() { - spinner.remove(); - }); + // Changing branch will trigger a runtime event + // that leads to a project refresh. + closeBranchBox(function() { + spinner.remove(); }); }, 400: { @@ -672,7 +672,9 @@ RED.sidebar.versionControl = (function() { }, } },body).always(function(){ - RED.deploy.setDeployInflight(false); + setTimeout(function() { + RED.deploy.setDeployInflight(false); + },500); }); } });