Skip to content

Commit

Permalink
fix initial activation of controllers on setup load
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckegg committed Jan 3, 2017
1 parent aa23892 commit aef9db0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions nodes/project/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,16 @@ function Project (parentContext) {

object.onLoad(function () {
broadcastItemLoaded(object)
onceIdle(() => clearInterval(timer))
onceIdle(() => {
clearInterval(timer)
if (object.node && object.node.grabInput) {
object.node.grabInput()
}
})

if (!~obs.items.indexOf(object)) {
obs.items.push(object)
}

if (object.node && object.node.grabInput) {
object.node.grabInput()
}
})

object.onClosing(function () {
Expand Down Expand Up @@ -370,7 +371,7 @@ function Project (parentContext) {
if (path) {
lastSelected = findItemByPath(obs.items, path)
actions.scrollToSelected()
setImmediate(actions.grabInputForSelected)
onceIdle(actions.grabInputForSelected)
}
})

Expand Down

0 comments on commit aef9db0

Please sign in to comment.