Remove PaneContainer.monitorPaneItems

This commit is contained in:
Nathan Sobo
2017-04-06 13:01:17 -06:00
parent 326ae6bf32
commit 2f7fb3f565

View File

@@ -20,7 +20,6 @@ class PaneContainer {
this.setRoot(new Pane({container: this, config: this.config, applicationDelegate, notificationManager, deserializerManager, viewRegistry: this.viewRegistry}))
this.setActivePane(this.getRoot())
this.monitorPaneItems()
}
initialize () {
@@ -264,6 +263,11 @@ class PaneContainer {
didAddPane (event) {
this.emitter.emit('did-add-pane', event)
const items = event.pane.getItems()
for (let i = 0, length = items.length; i < length; i++) {
const item = items[i]
this.didAddPaneItem(item, event.pane, i)
}
}
willDestroyPane (event) {
@@ -306,14 +310,4 @@ class PaneContainer {
this.subscriptions.add(childSubscription)
}))
}
monitorPaneItems () {
this.subscriptions.add(this.observePanes(pane => {
const iterable = pane.getItems()
for (let index = 0; index < iterable.length; index++) {
const item = iterable[index]
this.didAddPaneItem(item, pane, index)
}
}))
}
}