Each of the image windows can remember up to 9 of the previous images, so that undoing undesired processes is possible. To define the Undo settings click on File > Undo Settings
By selecting, the number of images to be saved per image you can find the right compromise between memory consumption and the ability to go many steps back.
The Radio buttons determine if the Undo function should be Off, Only active for the Main Image Window or all images.
When active, functions can be undone by Ctrl+Z and redone again by Ctrl+Y.
Alternatively, you can use the Undo/Redo buttons of the Quick Access toolbar, which also will indicate if they are something to undo or redo: