From 8e33682838640d0a3f4353f85f16b1045e27d859 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 22 Mar 2023 08:26:20 -0400 Subject: Refresh canvas on enter, not boot. --- catbird/node-2d.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catbird/node-2d.scm b/catbird/node-2d.scm index 9199536..a2e11f0 100644 --- a/catbird/node-2d.scm +++ b/catbird/node-2d.scm @@ -972,6 +972,9 @@ PADDING on all sides." #:observe? #t) (canvas #:accessor canvas #:init-thunk path:make-empty-canvas)) +(define-method (on-enter (c )) + (refresh-painter c)) + ;; Width and height of canvas nodes default to the size of their ;; initial painter, or 0 if there isn't one. (define-method (default-width (c )) @@ -1002,9 +1005,6 @@ PADDING on all sides." (path:scale (vec2 (/ w pw) (/ h ph)) p)))) (path:set-canvas-painter! (canvas c) p*))))) -(define-method (on-boot (c )) - (refresh-painter c)) - (define-method ((setter canvas) (c )) (next-method) (path:set-canvas-painter! (canvas c) (painter c))) -- cgit v1.2.3