summaryrefslogtreecommitdiff
path: root/starling/node.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-09-11 08:36:40 -0400
committerDavid Thompson <dthompson2@worcester.edu>2018-09-11 08:36:40 -0400
commit901b024b1f0bc543da379990c5d8c56e9efda8b0 (patch)
tree8dce9122d5f2623e1822335c8608313dab48c3dc /starling/node.scm
parente08f4cc1c7c46ad24526b43da014006f04891c21 (diff)
node: Add child to parent's hash table before calling activate hook.
More order of operations bugs! Yay! * starling/node.scm (attach-to): Add child nodes to children-map before calling activate.
Diffstat (limited to 'starling/node.scm')
-rw-r--r--starling/node.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/starling/node.scm b/starling/node.scm
index 101887e..1b162f6 100644
--- a/starling/node.scm
+++ b/starling/node.scm
@@ -190,11 +190,11 @@ represented as a ratio in the range [0, 1]."
;; index for quick lookup later.
(for-each (lambda (child)
(set! (parent child) new-parent)
+ (hashq-set! (children-map new-parent) (name child) child)
;; If the parent is active, that means the new children
;; must also be active.
(when (active? new-parent)
- (activate child))
- (hashq-set! (children-map new-parent) (name child) child))
+ (activate child)))
new-children))
(define-method (detach (node <node>))