Commit fc09e7e9 authored by ioedeveloper's avatar ioedeveloper

Changed switchFile event to openFile event

parent b94fe92d
...@@ -285,7 +285,7 @@ function fileExplorer (localRegistry, files, menuItems) { ...@@ -285,7 +285,7 @@ function fileExplorer (localRegistry, files, menuItems) {
const removeFile = await fileManager.remove(key) const removeFile = await fileManager.remove(key)
if (!removeFile) { if (!removeFile) {
tooltip(`failed to remove file ${key}.`) tooltip(`Failed to remove file ${key}.`)
} else { } else {
const { type } = fileManager.currentFileProvider() const { type } = fileManager.currentFileProvider()
self.updatePath(type) self.updatePath(type)
......
...@@ -61,7 +61,7 @@ export class MainView { ...@@ -61,7 +61,7 @@ export class MainView {
self._view.mainPanel.style.display = 'none' self._view.mainPanel.style.display = 'none'
self._components.contextView.show() self._components.contextView.show()
}) })
self.tabProxy.event.on('switchFile', (file) => { self.tabProxy.event.on('openFile', (file) => {
self._view.editor.style.display = 'block' self._view.editor.style.display = 'block'
self._view.mainPanel.style.display = 'none' self._view.mainPanel.style.display = 'none'
self._components.contextView.show() self._components.contextView.show()
......
...@@ -35,7 +35,7 @@ export class TabProxy { ...@@ -35,7 +35,7 @@ export class TabProxy {
} }
this.addTab(file, '', () => { this.addTab(file, '', () => {
this.fileManager.open(file) this.fileManager.open(file)
this.event.emit('switchFile', file) this.event.emit('openFile', file)
}, },
() => { () => {
this.fileManager.closeFile(file) this.fileManager.closeFile(file)
...@@ -48,7 +48,7 @@ export class TabProxy { ...@@ -48,7 +48,7 @@ export class TabProxy {
// should change the tab title too // should change the tab title too
this.addTab(newName, '', () => { this.addTab(newName, '', () => {
this.fileManager.open(newName) this.fileManager.open(newName)
this.event.emit('switchFile', newName) this.event.emit('openFile', newName)
}, },
() => { () => {
this.fileManager.closeFile(newName) this.fileManager.closeFile(newName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment