Destroy WorkspaceCenter and Docks instead of PaneContainer

This commit is contained in:
Nathan Sobo
2017-04-06 16:58:33 -06:00
parent f15b6d9074
commit f808411c96
2 changed files with 13 additions and 2 deletions

View File

@@ -17,6 +17,10 @@ module.exports = class WorkspaceCenter {
this.paneContainer.onDidDestroyPaneItem((item) => params.didDestroyPaneItem(item))
}
destroy () {
this.paneContainer.destroy()
}
activate () {
this.getActivePane().activate()
}

View File

@@ -135,7 +135,11 @@ module.exports = class Workspace extends Model {
this.emitter.dispose()
this.emitter = new Emitter()
this.paneContainer.destroy()
this.center.destroy()
this.docks.left.destroy()
this.docks.right.destroy()
this.docks.bottom.destroy()
_.values(this.panelContainers).forEach(panelContainer => { panelContainer.destroy() })
this.center = this.createCenter()
@@ -1345,7 +1349,10 @@ module.exports = class Workspace extends Model {
// Called by Model superclass when destroyed
destroyed () {
this.paneContainer.destroy()
this.center.destroy()
this.docks.left.destroy()
this.docks.right.destroy()
this.docks.bottom.destroy()
this.cancelStoppedChangingActivePaneItemTimeout()
if (this.activeItemSubscriptions != null) {
this.activeItemSubscriptions.dispose()