"Select None" cannot be undone immediately if gradient tool is active
GIMP version: 2.10.10
Note: bug reporters are expected to have verified the bug still exists either in the last stable version of GIMP or on updated development code (master branch).
Operating System: Arch Linux (the bug might be OS independent)
Package: from pacman, gimp 2.10.10-1
Description of the bug
If you have an area of the image selected, and the gradient tool active at the same time, and click "Select None", you can't immediately undo it. Instead it lets you undo "Gradient Action" which you did before "Select None".
Also "Gradient Action" is not visible in the undo history, in "Edit" -> "Undo history".
Reproduction
Is the bug reproducible? Always
Reproduction steps:
1, select an area of the image with any select tool
2, choose the gradient tool, draw a gradient
3, while the gradient tool is still active, click "Select" -> "None"
At this point, if you go into "Edit" -> "Undo..." it shows "Undo Gradient Step".
However the last action was "Select None", and it's not possible to undo it immediately.
The "Gradient Step" action is also not added to the undo history, which is available in "Edit" -> "Undo history".
…
Expected result: I expect to be able to undo the "Select None" action after making it
Actual result: Instead it lets me undo the "Gradient Step", which I did before "Select None"