Commit 52d9f31
fix(undo-redo): use consistent target state for toggle redo
The redo logic for BATCH_TOGGLE_ENABLED and BATCH_TOGGLE_LOCKED was
incorrectly computing each block's new state as !previousStates[blockId].
However, the store's batchToggleEnabled/batchToggleLocked set ALL blocks
to the SAME target state based on the first block's previous state.
Now redo computes targetState = !previousStates[firstBlockId] and applies
it to all blocks, matching the store's behavior.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 3fbcfc6 commit 52d9f31
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1447 | 1447 | | |
1448 | 1448 | | |
1449 | 1449 | | |
1450 | | - | |
1451 | | - | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
1452 | 1454 | | |
1453 | | - | |
| 1455 | + | |
1454 | 1456 | | |
1455 | 1457 | | |
1456 | 1458 | | |
| |||
1505 | 1507 | | |
1506 | 1508 | | |
1507 | 1509 | | |
1508 | | - | |
1509 | | - | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1510 | 1514 | | |
1511 | | - | |
| 1515 | + | |
1512 | 1516 | | |
1513 | 1517 | | |
1514 | 1518 | | |
| |||
0 commit comments