From 901b024b1f0bc543da379990c5d8c56e9efda8b0 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 11 Sep 2018 08:36:40 -0400 Subject: 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. --- starling/node.scm | 4 ++-- 1 file 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 )) -- cgit v1.2.3