System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.87
Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-07 08:12, hash: rBb351607996e4
Worked: Some time before binary diffing was implemented maybe?
Short description of error
Note: This is about text editor operators, nothing to do with Text objects in the viewport.
Custom text operators that modify the text (text.body, text.write(), etc.) are missing undo steps IFF an object is in edit mode.
When an object is in object mode, however, the undo works as expected.
Text operators implemented in C work fine. Assuming the solution is letting custom operators push or tag undo like internal ones.
Exact steps for others to reproduce the error
- Load the example blend. The cube will be in edit mode.
- Run script. A new button "Modify Body" is placed in the header of Text Editor.
- Click the button a few times.
- Try to undo (doesn't work)
- Toggle to Object mode and do steps 3 and 4 again (undo works)