sessions: remember last browsed folder
This commit is contained in:
parent
61ae8a6fbe
commit
c1e6008f39
1 changed files with 5 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ var SessionManager = class SessionManager {
|
|||
|
||||
this.session = null
|
||||
this.lock = false
|
||||
this.lastDir = null
|
||||
this.setSessionPath('')
|
||||
|
||||
ipc.on('connect', ()=>{
|
||||
|
|
@ -116,7 +117,8 @@ var SessionManager = class SessionManager {
|
|||
|
||||
if (!this.session) return
|
||||
|
||||
remoteBrowse({extension: 'json', save:true}, (path)=>{
|
||||
remoteBrowse({extension: 'json', save:true, directory: this.lastDir}, (path)=>{
|
||||
this.lastDir = path[0]
|
||||
this.save(path)
|
||||
})
|
||||
|
||||
|
|
@ -207,8 +209,9 @@ var SessionManager = class SessionManager {
|
|||
|
||||
browse() {
|
||||
|
||||
remoteBrowse({extension: 'json'}, (path)=>{
|
||||
remoteBrowse({extension: 'json', directory: this.lastDir}, (path)=>{
|
||||
if (editor.unsavedSession && !confirm(locales('session_unsaved'))) return
|
||||
this.lastDir = path[0]
|
||||
ipc.send('sessionOpen',{path:path})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue