From 9e333d760997bb632ff9a12ce3f60b13d67a7c1d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 26 Jul 2021 13:38:53 +0530 Subject: [PATCH] Fix #1936897 [[Viewer] The context menu action "Edit notes for this highlight" appears twice in the menu](https://bugs.launchpad.net/calibre/+bug/1936897) --- src/calibre/gui2/viewer/highlights.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/calibre/gui2/viewer/highlights.py b/src/calibre/gui2/viewer/highlights.py index 336442d35b..98f1beea30 100644 --- a/src/calibre/gui2/viewer/highlights.py +++ b/src/calibre/gui2/viewer/highlights.py @@ -184,12 +184,10 @@ class Highlights(QTreeWidget): self.context_menu = m = QMenu(self) if h is not None: m.addAction(QIcon(I('edit_input.png')), _('Modify this highlight'), self.edit_requested.emit) - m.addAction(QIcon(I('edit_input.png')), _('Edit notes for this highlight'), self.edit_notes_requested.emit) + m.addAction(QIcon(I('modified.png')), _('Edit notes for this highlight'), self.edit_notes_requested.emit) m.addAction(QIcon(I('trash.png')), ngettext( 'Delete this highlight', 'Delete selected highlights', len(self.selectedItems()) ), self.delete_requested.emit) - if h.get('notes'): - m.addAction(QIcon(I('modified.png')), _('Edit notes for this highlight'), self.edit_notes_requested.emit) m.addSeparator() m.addAction(_('Expand all'), self.expandAll) m.addAction(_('Collapse all'), self.collapseAll)