Add confirm dialog to discard all changes. Fixes #222