Initialize editor when loading a folder and show default tab (#729)

This commit is contained in:
Felix Häusler 2019-03-07 15:35:16 +01:00 committed by Ran Luo
parent b4c23d1f02
commit 44c537a62c

View File

@ -106,6 +106,9 @@ const mutations = {
const actions = { const actions = {
LISTEN_FOR_LOAD_PROJECT ({ commit, dispatch }) { LISTEN_FOR_LOAD_PROJECT ({ commit, dispatch }) {
ipcRenderer.on('AGANI::open-project', (e, { pathname, name }) => { ipcRenderer.on('AGANI::open-project', (e, { pathname, name }) => {
// Initialize editor and show empty/new tab
dispatch('NEW_BLANK_FILE')
dispatch('INIT_STATUS', true) dispatch('INIT_STATUS', true)
commit('SET_PROJECT_TREE', { pathname, name }) commit('SET_PROJECT_TREE', { pathname, name })
commit('SET_LAYOUT', { commit('SET_LAYOUT', {