Index: third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js b/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js |
index 7178c35048f11183bf749f84f20f2b6da2aa1bbb..fcbe43491f763e5a92d84b52267516630c1838df 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js |
@@ -214,6 +214,7 @@ WebInspector.TabbedEditorContainer.prototype = { |
var previousView = this._currentView; |
this._currentView = this.visibleView; |
+ WebInspector.context.setFlavor(WebInspector.UISourceCodeFrame, this._currentView instanceof WebInspector.UISourceCodeFrame ? this._currentView : null); |
this._addViewListeners(); |
var eventData = { |
@@ -249,9 +250,12 @@ WebInspector.TabbedEditorContainer.prototype = { |
// FIXME: this should be replaced with common Save/Discard/Cancel dialog. |
if (!shouldPrompt || confirm(WebInspector.UIString("Are you sure you want to close unsaved file: %s?", uiSourceCode.name()))) { |
uiSourceCode.resetWorkingCopy(); |
+ var previousView = this._currentView; |
if (nextTabId) |
this._tabbedPane.selectTab(nextTabId, true); |
this._tabbedPane.closeTab(id, true); |
+ if (WebInspector.context.flavor(WebInspector.UISourceCodeFrame) === previousView) |
+ WebInspector.context.setFlavor(WebInspector.UISourceCodeFrame, null); |
return true; |
} |
return false; |