diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-09-11 08:36:40 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-09-11 08:36:40 -0400 |
commit | 901b024b1f0bc543da379990c5d8c56e9efda8b0 (patch) | |
tree | 8dce9122d5f2623e1822335c8608313dab48c3dc | |
parent | e08f4cc1c7c46ad24526b43da014006f04891c21 (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.
-rw-r--r-- | starling/node.scm | 4 |
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>)) |