From 5edce0a4deff1ef8e43c0ad20982ea084ae49dd1 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 20 Apr 2024 14:18:51 +1000 Subject: [PATCH] perf(ui): caching efficiency --- .../web/src/features/regionalPrompts/util/renderers.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts b/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts index 154d2cd9c2..7a09d4ac39 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts +++ b/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts @@ -217,7 +217,6 @@ const renderRPLayer = ( if (konvaObjectGroup.opacity() !== layerOpacity) { konvaObjectGroup.opacity(layerOpacity); - groupNeedsCache = true; } // Remove deleted objects @@ -265,8 +264,8 @@ const renderRPLayer = ( groupNeedsCache = true; } // Only update layer visibility if it has changed. - if (konvaObject.visible() !== rpLayer.isVisible) { - konvaObject.visible(rpLayer.isVisible); + if (konvaLayer.visible() !== rpLayer.isVisible) { + konvaLayer.visible(rpLayer.isVisible); groupNeedsCache = true; } }