jven / studyopenings

A tool to study chess openings.
http://studyopenings.com
MIT License
97 stars 13 forks source link

Confirm deletions before doing them. Or add undo. #2

Open jven opened 5 years ago

jven commented 5 years ago

Right now deleting a move and deleting a repertoire are irreversible actions so accidentally doing them can lose a lot of data.

Either add an "Are you sure?" warning or make these actions undoable.

jven commented 5 years ago

This was reported once by a user:

"I lost my repertoire by clicking the trash icon and there is no ctrl Z or way to go back :("

jven commented 5 years ago

I added an "Are you sure" dialog for deleting repertoires in abde78ca6fa7697da50b5ca70523ff16f47fa0f7.

Should be able to do the same for deleting nodes from the TreeModel. Maybe the dialog can be shown only if deleting >= 5 moves or so.