fix(simulator): recordUpdateWire was never bound in SimulatorCanvas (ReferenceError)

recordUpdateWire was used by the wire colour palette and the right-click menu but
never destructured from the store, so every colour-swatch click threw
'recordUpdateWire is not defined' and did nothing. tsc would have caught this, but
build:docker skips type-checking, and the only prior caller (the touch-only palette)
was never exercised. Bind it like the other record* actions. Together with the
applyNow fix this makes wire colour changes from the UI actually work.
This commit is contained in:
David Montero 2026-06-19 20:28:54 +02:00
parent 4a46cd6c95
commit e1697dc6f3
1 changed files with 1 additions and 0 deletions

View File

@ -165,6 +165,7 @@ export const SimulatorCanvas = ({ headerSlot }: SimulatorCanvasProps = {}) => {
const recordRotate = useSimulatorStore((s) => s.recordRotate);
const recordSetProperty = useSimulatorStore((s) => s.recordSetProperty);
const recordRemoveWire = useSimulatorStore((s) => s.recordRemoveWire);
const recordUpdateWire = useSimulatorStore((s) => s.recordUpdateWire);
// Subscribe to history shape so the undo/redo buttons reactively
// enable/disable and their tooltips reflect the next command.
const history = useSimulatorStore((s) => s.history);