mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Destroy WorkspaceCenter and Docks instead of PaneContainer
This commit is contained in:
@@ -17,6 +17,10 @@ module.exports = class WorkspaceCenter {
|
||||
this.paneContainer.onDidDestroyPaneItem((item) => params.didDestroyPaneItem(item))
|
||||
}
|
||||
|
||||
destroy () {
|
||||
this.paneContainer.destroy()
|
||||
}
|
||||
|
||||
activate () {
|
||||
this.getActivePane().activate()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user