Merge pull request #12673 from atom/ns-fix-add-pane-event

Ensure pane is added to container before invoking onDidAddPane listeners
This commit is contained in:
Nathan Sobo
2016-09-12 13:39:38 -06:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -75,12 +75,10 @@ class PaneAxis extends Model
@onDidChangeFlexScale(fn)
addChild: (child, index=@children.length) ->
@children.splice(index, 0, child)
child.setParent(this)
child.setContainer(@container)
@subscribeToChild(child)
@children.splice(index, 0, child)
@emitter.emit 'did-add-child', {child, index}
adjustFlexScale: ->