The Undo Markup command allows you to cancel the last action you performed in the markup layer.
This command is available only after you have an active markup layer.
Once you click the Undo Markup command, it is replaced by the Redo Markup command, as only the last action can be reversed. Clicking the Redo Markup command performs again the action you reversed with the Undo Markup command.