Don't add when cancelling "New Bookmark" dialog
requested to merge michaelweghorn/accerciser:michaelweghorn/fix_cancelling_new_bookmark_dialog into master
BookmarkStore#_onAddBookmark
first adds the
bookmark and then initializes the "New Bookmark"
dialog with the data of the bookmark.
When the dialog is cancelled, the bookmark therefore needs to be completely removed again, including its menu entry, not just the entry from the list store.
This fixes the following use case:
- select any node in the treeview
- "Bookmarks" -> "Add Bookmark" ("New Bookmark" dialog shows up)
- press the "Cancel" button in the dialog
Without this commit in place, an entry for the bookmark would be present in the menu despite cancelling, but that entry would not be there anymore after restarting Accerciser.
With this change in place, the entry is only there when actually selecting "Add" in the dialog.
(Issue unrelated to recent porting of the menu in ea98703d, already reproducible e.g. with tag 3.42.0).