mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Brush and eraser mouseUp handlers were bumping _historyVersion a second time (after addObject already bumped it in mouseDown). This created a ghost history entry whose objects array held the same reference as the current state. On undo, zundo restored that identical reference, so zustand's Object.is selector equality saw no change and skipped the canvas re-render -- the stroke stayed visible even though the history panel moved backward. Remove the redundant _historyVersion increment from both mouseUp handlers. The addObject call in mouseDown already records the correct pre-stroke snapshot. mouseUp now only patches lastAction for the history label without creating a new temporal entry.