Fix reopen project when there are no open windows

This commit is contained in:
Rafael Oleza
2019-03-26 16:52:40 +01:00
parent 3f67989b3b
commit 9f453e64fe
4 changed files with 51 additions and 7 deletions

View File

@@ -403,6 +403,10 @@ class AtomApplication extends EventEmitter {
this.on('application:check-for-update', () => this.autoUpdateManager.check())
if (process.platform === 'darwin') {
this.on('application:reopen-project', ({ paths }) => {
this.openPaths({ pathsToOpen: paths })
})
this.on('application:open', () => this.promptForPathToOpen('all', getLoadSettings(), getDefaultPath()))
this.on('application:open-file', () => this.promptForPathToOpen('file', getLoadSettings(), getDefaultPath()))
this.on('application:open-folder', () => this.promptForPathToOpen('folder', getLoadSettings(), getDefaultPath()))