Commit a8a423fa authored by Joel Einbinder's avatar Joel Einbinder Committed by Commit Bot

DevTools: Don't reveal UISourceCode on simple rename

Bug: 668953
Change-Id: I33337f5297c5e17c24540355799d14079401cdfb
Reviewed-on: https://chromium-review.googlesource.com/761261Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515790}
parent 94b16051
...@@ -742,10 +742,10 @@ Sources.NavigatorView = class extends UI.VBox { ...@@ -742,10 +742,10 @@ Sources.NavigatorView = class extends UI.VBox {
/** /**
* @param {!Sources.NavigatorUISourceCodeTreeNode} node * @param {!Sources.NavigatorUISourceCodeTreeNode} node
* @param {boolean} deleteIfCanceled * @param {boolean} creatingNewUISourceCode
* @protected * @protected
*/ */
rename(node, deleteIfCanceled) { rename(node, creatingNewUISourceCode) {
var uiSourceCode = node.uiSourceCode(); var uiSourceCode = node.uiSourceCode();
node.rename(callback.bind(this)); node.rename(callback.bind(this));
...@@ -754,13 +754,12 @@ Sources.NavigatorView = class extends UI.VBox { ...@@ -754,13 +754,12 @@ Sources.NavigatorView = class extends UI.VBox {
* @param {boolean} committed * @param {boolean} committed
*/ */
function callback(committed) { function callback(committed) {
if (!committed) { if (!creatingNewUISourceCode)
if (deleteIfCanceled)
uiSourceCode.remove();
return; return;
} if (!committed)
uiSourceCode.remove();
this._sourceSelected(uiSourceCode, true); else
this._sourceSelected(uiSourceCode, true);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment