From 8ded112da336a0d3977066ec0708ac9e80286b9d Mon Sep 17 00:00:00 2001 From: wass08 Date: Tue, 10 Feb 2026 13:28:47 +0900 Subject: [PATCH] fix item panel --- apps/editor/components/ui/panels/item-panel.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/editor/components/ui/panels/item-panel.tsx b/apps/editor/components/ui/panels/item-panel.tsx index 50f9165a..f9c086be 100644 --- a/apps/editor/components/ui/panels/item-panel.tsx +++ b/apps/editor/components/ui/panels/item-panel.tsx @@ -24,10 +24,15 @@ export function ItemPanel() { const handleUpdate = useCallback( (updates: Partial) => { - if (!selectedId) return + if (!selectedId || !node) return updateNode(selectedId as AnyNode['id'], updates) + + // Mark parent wall as dirty if item is attached to wall + if (node.asset.attachTo === 'wall' && node.parentId) { + useScene.getState().dirtyNodes.add(node.parentId as AnyNode['id']) + } }, - [selectedId, updateNode], + [selectedId, node, updateNode], ) const handleClose = useCallback(() => { @@ -175,18 +180,18 @@ export function ItemPanel() {