зеркало из https://github.com/mozilla/brackets.git
Merge pull request #10022 from adobe/kai/fix-9975-modal-dialog-is-not-modal
Fix #9975.
This commit is contained in:
Коммит
e0c0b9879b
|
@ -291,13 +291,24 @@ define(function (require, exports, module) {
|
|||
PerfUtils.addMeasurement("Application Startup");
|
||||
|
||||
if (PreferencesManager._isUserScopeCorrupt()) {
|
||||
var userPrefFullPath = PreferencesManager.getUserPrefFile();
|
||||
// user scope can get corrupt only if the file exists, is readable,
|
||||
// but malformed. no need to check for its existance.
|
||||
var info = MainViewManager.findInAllWorkingSets(userPrefFullPath);
|
||||
var paneId;
|
||||
if (info.length) {
|
||||
paneId = info[0].paneId;
|
||||
}
|
||||
FileViewController.openFileAndAddToWorkingSet(userPrefFullPath, paneId)
|
||||
.done(function () {
|
||||
Dialogs.showModalDialog(
|
||||
DefaultDialogs.DIALOG_ID_ERROR,
|
||||
Strings.ERROR_PREFS_CORRUPT_TITLE,
|
||||
Strings.ERROR_PREFS_CORRUPT
|
||||
)
|
||||
.done(function () {
|
||||
CommandManager.execute(Commands.FILE_OPEN_PREFERENCES);
|
||||
).done(function () {
|
||||
// give the focus back to the editor with the pref file
|
||||
MainViewManager.focusActivePane();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче