Fix #1936897 [[Viewer] The context menu action "Edit notes for this highlight" appears twice in the menu](https://bugs.launchpad.net/calibre/+bug/1936897)

This commit is contained in:
Kovid Goyal 2021-07-26 13:38:53 +05:30
parent 0952aed8f6
commit 9e333d7609
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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)