Skip to content

Don't add when cancelling "New Bookmark" dialog

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:

  1. select any node in the treeview
  2. "Bookmarks" -> "Add Bookmark" ("New Bookmark" dialog shows up)
  3. 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).

Merge request reports