Drawing in Canvas is not shown when form opens

I have a form1 in which a Card can be made visible upon the push of a button. On this Card is another form2 which shows a canvas with a drawing. This drawing is not shown. However, if open form2 directly the drawing is shown correctly.
Now the strange thing is that if I add a button to form2 which instructs to redraw the canvas then the drawing is shown correctly when I push the button in form1, without clicking the redraw button in form2. Apparently the one line of code that was added, but not executed had impact?

For clarity I will share a simple version of the problem in an app clone:
Clone link:
https://anvil.works/build#clone:YYCRKAHNPGX5K3TM=YQRGKGQ2QJXRRYILKV7DU2IG

Where you’ve used the show event for the canvas, you should be using the reset event.
The reset event fires anytime the canvas needs to be redrawn.
If you don’t redraw the canvas when the reset event fires then you’ll be left with a blank canvas.

(it just so happens that with your set up the reset event was firing before the button’s show event - so you were triggering a redraw at the right time but for the wrong reason)

Thanks stucork for your swift reply and the solution of my mystery! I was not really aware of the reset function.

Hey
This answer is a great answer…
It took me a while to understand why the famous Magnified wombat App, presumably written by the @anvil staff uses canvas_1_show instead of canvas_1_reset. The wombat image appears only after moving the mouse over the canvas for the first time
Thanks @stucork!!