Wicklets / wick-editor-2018

Archived - New repo is now at github.com/wicklets/wick-editor
GNU General Public License v3.0
516 stars 57 forks source link

[New brush] Undo while drawing with Brush deletes the wrong object #857

Open kryptot7 opened 6 years ago

kryptot7 commented 6 years ago

To reproduce: Use the brush tool to draw a path. Before releasing the mouse button (or immediately after), hit Ctrl-Z (Undo).

Expected behavior: The path you just finished drawing is deleted.

Result: Whatever you did BEFORE drawing said path is undone, instead.

If you press Undo while drawing, you can undo several actions you did before you started drawing the stroke. The expected behavior of Undo while drawing is either nothing (like in Flash) or the brush stroke in progress is deleted. Also, each path drawn by the brush needs time to smooth itself out or catch up to your cursor after you release the mouse button. During the small window between the release of the mouse button and the completion of the path, this bug can occur.