Operating system: Win 10
Caused by rB4c7b1766a7f1: Fix undo steps not allowing re-using old BMain in non-global undo.
Short description of error
In the sculpting template, the Undo (ctrl+z) function doesn't undo the first stroke.
However, if you then click "Redo" (shift+ctrl+z), it will actually undo the first stroke... This is a separated issue, see T82532: Sculpt Redo does not always properly apply the first stroke of the sculpt session
Same issue cause a slightly different bug when one switch from Object mode to Sculpt mode, draws a stroke, then undo twice: the object does not go back to Object mode as expected.
Exact steps for others to reproduce the error
- Perform a brush stroke
- Undo (ctrl+z) - It should undo the brush stroke, but nothing happens.
Redo (shift+ctrl+z) - Now it will undo the brush stroke.
- Default startup file, switch to sculpt mode.
- Draw a stroke.
- Undo twice.
Even not using the sculpting template, you can still replicate this erratic behavior in sculpt mode, if you load a texture/perform a brush stroke and try to undo... the undo won't work, but the Redo will undo the brush stroke...