From fb25cf11e7870dd442a0778b9e40c2ee41e2b188 Mon Sep 17 00:00:00 2001 From: Nathan Marrs Date: Wed, 27 Apr 2022 13:33:07 -0700 Subject: [PATCH] Address crash by properly updating currentLayer and refreshing selection to force update instance state (#48373) --- public/app/features/canvas/runtime/scene.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app/features/canvas/runtime/scene.tsx b/public/app/features/canvas/runtime/scene.tsx index 0db06d31aff..d16e63f89db 100644 --- a/public/app/features/canvas/runtime/scene.tsx +++ b/public/app/features/canvas/runtime/scene.tsx @@ -91,6 +91,8 @@ export class Scene { // If editing is enabled, clear selecto instance const destroySelecto = enableEditing; this.initMoveable(destroySelecto, enableEditing); + this.currentLayer = this.root; + this.selection.next([]); } }, 100); return this.root;