The software incorporates a powerful facility to allow you to undo any operation, putting your project back into the state it was before the operation.
To undo your last operation click the button on the toolbar, or press Ctrl Z on the keyboard.
You can also access the Undo facility from the Edit menu.
This gives the added benefit that is shows specifically which operation would be undone.
The undo operation may be performed multiple times to revoke many operations. You can undo everything right back to when you opened the project in the current session.
Note: The undo works on the last operation performed in the active project, and as such, may apply to an operation performed on any of the project's windows. For example, if you display a road longsection, perform two operations on it, and then click undo three times, you will undo the two longsection operations and whatever operation you did on the other window before you displayed the longsection.