From 013414e9626648862d6f7234032b2767bbf4a245 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 5 Sep 2024 22:31:33 +1000 Subject: [PATCH] fix(ui): cancel transform/filter when deleting entity --- .../konva/CanvasEntityAdapter/CanvasEntityAdapterBase.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntityAdapter/CanvasEntityAdapterBase.ts b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntityAdapter/CanvasEntityAdapterBase.ts index 22b64a7a8c..3c6d2f6c52 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntityAdapter/CanvasEntityAdapterBase.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntityAdapter/CanvasEntityAdapterBase.ts @@ -197,7 +197,13 @@ export abstract class CanvasEntityAdapterBase< this.subscriptions.forEach((unsubscribe) => unsubscribe()); this.subscriptions.clear(); this.renderer.destroy(); + if (this.transformer.$isTransforming.get()) { + this.transformer.stopTransform(); + } this.transformer.destroy(); + if (this.manager.filter.$adapter.get()?.id === this.id) { + this.manager.filter.cancelFilter(); + } this.konva.layer.destroy(); this.manager.deleteAdapter(this.entityIdentifier); };