Merge pull request #10022 from adobe/kai/fix-9975-modal-dialog-is-not-modal

Fix #9975.
This commit is contained in:
Randy Edmunds 2014-12-02 12:09:35 -08:00
Родитель 71b00c3fba 9afe56cea3
Коммит e0c0b9879b
1 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -291,13 +291,24 @@ define(function (require, exports, module) {
PerfUtils.addMeasurement("Application Startup");
if (PreferencesManager._isUserScopeCorrupt()) {
Dialogs.showModalDialog(
DefaultDialogs.DIALOG_ID_ERROR,
Strings.ERROR_PREFS_CORRUPT_TITLE,
Strings.ERROR_PREFS_CORRUPT
)
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 () {
CommandManager.execute(Commands.FILE_OPEN_PREFERENCES);
Dialogs.showModalDialog(
DefaultDialogs.DIALOG_ID_ERROR,
Strings.ERROR_PREFS_CORRUPT_TITLE,
Strings.ERROR_PREFS_CORRUPT
).done(function () {
// give the focus back to the editor with the pref file
MainViewManager.focusActivePane();
});
});
}