From 33939f2e84431d64e6bc2bef07161eafcfba0c0e Mon Sep 17 00:00:00 2001 From: haikalvidya Date: Tue, 2 Apr 2024 22:43:51 +0700 Subject: [PATCH] Fix icon logic on panel locked layer --- frontend/src/components/panels/Layers.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/panels/Layers.svelte b/frontend/src/components/panels/Layers.svelte index 4b9f325af2..eda649494c 100644 --- a/frontend/src/components/panels/Layers.svelte +++ b/frontend/src/components/panels/Layers.svelte @@ -430,8 +430,8 @@ classes={{ inactive: !listing.entry.parentsUnlocked }} action={(e) => (toggleLayerLock(listing.entry.id), e?.stopPropagation())} size={24} - icon={listing.entry.parentsUnlocked ? "PadlockLocked" : "PadlockUnlocked"} - hoverIcon={listing.entry.parentsUnlocked ? "PadlockUnlocked" : "PadlockLocked"} + icon={(listing.entry.parentId && listing.entry.parentsUnlocked) || !listing.entry.unlocked ? "PadlockLocked" : "PadlockUnlocked"} + hoverIcon={(listing.entry.parentId && listing.entry.parentsUnlocked) || !listing.entry.unlocked ? "PadlockUnlocked" : "PadlockLocked"} tooltip={listing.entry.parentsUnlocked ? "Unlock" : "Lock"} /> {/if}