System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.49
Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-15 21:08, hash: rB7e42ae7c1af0
Short description of error
The buttons for face or vertex masking on weight paint and vertex paint modes alck an undo push
Exact steps for others to reproduce the error
This file is on Weight Paint mode
Paint on a vertex
Click on any of those two buttons (face and vertex masks)
Ctrl+Z
Not only the button press is reverted but also the vertex weight
The exact same problem exists in Vertex Paint mode
