Index: Source/devtools/front_end/settings/EditFileSystemDialog.js |
diff --git a/Source/devtools/front_end/settings/EditFileSystemDialog.js b/Source/devtools/front_end/settings/EditFileSystemDialog.js |
index e332bff9e3d07f6c525a5b0c663e0407adb6eba0..56d7f088dc29e970be6da49ec78570c4f6d1ee20 100644 |
--- a/Source/devtools/front_end/settings/EditFileSystemDialog.js |
+++ b/Source/devtools/front_end/settings/EditFileSystemDialog.js |
@@ -88,6 +88,7 @@ WebInspector.EditFileSystemDialog = function(fileSystemPath) |
this._addExcludedFolderRow(excludedFolderEntries[i]); |
this.element.tabIndex = 0; |
+ this._hasMappingChanges = false; |
} |
WebInspector.EditFileSystemDialog.show = function(element, fileSystemPath) |
@@ -137,6 +138,10 @@ WebInspector.EditFileSystemDialog.prototype = { |
willHide: function(event) |
{ |
+ if (!this._hasMappingChanges) |
+ return; |
+ if (window.confirm(WebInspector.UIString("It is recommended to restart inspector after making these changes. Would you like to restart it?"))) |
dgozman
2014/08/01 10:34:10
Should we use the term "DevTools" instead of "insp
|
+ WebInspector.reload(); |
}, |
_fileMappingAdded: function(event) |
@@ -229,6 +234,7 @@ WebInspector.EditFileSystemDialog.prototype = { |
var entry = this._entries[urlPrefix]; |
WebInspector.isolatedFileSystemManager.mapping().removeFileMapping(entry.fileSystemPath, entry.urlPrefix, entry.pathPrefix); |
+ this._hasMappingChanges = true; |
}, |
/** |
@@ -241,6 +247,7 @@ WebInspector.EditFileSystemDialog.prototype = { |
var normalizedURLPrefix = this._normalizePrefix(urlPrefix); |
var normalizedPathPrefix = this._normalizePrefix(pathPrefix); |
WebInspector.isolatedFileSystemManager.mapping().addFileMapping(this._fileSystemPath, normalizedURLPrefix, normalizedPathPrefix); |
+ this._hasMappingChanges = true; |
this._fileMappingsList.selectItem(normalizedURLPrefix); |
return true; |
}, |