From f676feaff7c58cc14110177a73de13f0abb6dc68 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 19 Sep 2024 21:23:25 +1000 Subject: [PATCH] fix(ui): re-render tool when entity interaction state changes --- .../konva/CanvasEntity/CanvasEntityAdapterBase.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityAdapterBase.ts b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityAdapterBase.ts index 22cccec092..e14eb5834e 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityAdapterBase.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityAdapterBase.ts @@ -154,6 +154,12 @@ export abstract class CanvasEntityAdapterBase< * - The entity's transformer interaction state, which will show/hide the entity's selection outline */ this.subscriptions.add(this.manager.stateApi.createStoreSubscription(this.selectIsHidden, this.syncVisibility)); + + /** + * The tool preview may need to be updated when the entity is locked or disabled. For example, when we disable the + * entity, we should hide the tool preview & change the cursor. + */ + this.subscriptions.add(this.$isInteractable.subscribe(this.manager.tool.render)); } /**