The brush commits via a GPU-canvas readback and relies on the action's first execute() to SET raw_pixels from that readback — at that point raw_pixels is empty (new keyframe) or the pre-stroke state, never something a dirty-rect diff can stamp onto. My initial diff-only execute skipped (to avoid corruption), so the stroke disappeared. Fix: the action keeps the full post-edit buffer ONLY for the first execute (the commit), assigning raw_pixels outright exactly like the old code; it's taken/dropped immediately, so the action sitting in the undo stack still retains just the small diff. Redo replays via the diff onto the now-resident base. Also harden the diff itself for the blank-base case: `before_blank` lets apply_after build from a transparent buffer (redo of a first stroke after undo-to-blank) and apply_before restore to empty; the resident-base skip is kept only for non-blank bases (faulted in before undo/redo). Tests cover commit/redo from empty. |
||
|---|---|---|
| .. | ||
| beamdsp | ||
| egui_node_graph2 | ||
| lightningbeam-core | ||
| lightningbeam-editor | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| build-static.sh | ||
| build-windows.bat | ||