diff --git a/src/app/App.tsx b/src/app/App.tsx index 8ec946c0..80bca769 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -128,15 +128,7 @@ export function App({ store, initialStatusMessage }: AppProps) { setPositionDraft(createVec3Draft(selectedBrush.center)); setSizeDraft(createVec3Draft(selectedBrush.size)); - }, [ - selectedBrush?.id, - selectedBrush?.center.x, - selectedBrush?.center.y, - selectedBrush?.center.z, - selectedBrush?.size.x, - selectedBrush?.size.y, - selectedBrush?.size.z - ]); + }, [selectedBrush]); const applySceneName = () => { const normalizedName = sceneNameDraft.trim() || "Untitled Scene"; diff --git a/src/commands/brush-command-helpers.ts b/src/commands/brush-command-helpers.ts index b0df5a07..cd16cd47 100644 --- a/src/commands/brush-command-helpers.ts +++ b/src/commands/brush-command-helpers.ts @@ -38,7 +38,10 @@ export function replaceBrush(document: SceneDocument, brush: BoxBrush): SceneDoc } export function removeBrush(document: SceneDocument, brushId: string): SceneDocument { - const { [brushId]: _removedBrush, ...remainingBrushes } = document.brushes; + const remainingBrushes = { + ...document.brushes + }; + delete remainingBrushes[brushId]; return { ...document, diff --git a/tests/domain/editor-store.test.ts b/tests/domain/editor-store.test.ts index bf7de1d6..8468f918 100644 --- a/tests/domain/editor-store.test.ts +++ b/tests/domain/editor-store.test.ts @@ -22,15 +22,15 @@ class MemoryStorage implements KeyValueStorage { } class ThrowingStorage implements KeyValueStorage { - getItem(_key: string): string | null { + getItem(): string | null { throw new Error("blocked read"); } - setItem(_key: string, _value: string): void { + setItem(): void { throw new Error("blocked write"); } - removeItem(_key: string): void {} + removeItem(): void {} } describe("EditorStore", () => { diff --git a/tests/serialization/local-draft-storage.test.ts b/tests/serialization/local-draft-storage.test.ts index 49ff4dad..db8b0548 100644 --- a/tests/serialization/local-draft-storage.test.ts +++ b/tests/serialization/local-draft-storage.test.ts @@ -35,7 +35,7 @@ class ThrowingStorage implements KeyValueStorage { } = {} ) {} - getItem(_key: string): string | null { + getItem(): string | null { if (this.options.onGetItem !== undefined) { throw this.options.onGetItem; } @@ -43,13 +43,13 @@ class ThrowingStorage implements KeyValueStorage { return null; } - setItem(_key: string, _value: string): void { + setItem(): void { if (this.options.onSetItem !== undefined) { throw this.options.onSetItem; } } - removeItem(_key: string): void { + removeItem(): void { if (this.options.onRemoveItem !== undefined) { throw this.options.onRemoveItem; }