mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
0952aed8f6
commit
9e333d7609
@ -184,12 +184,10 @@ class Highlights(QTreeWidget):
|
|||||||
self.context_menu = m = QMenu(self)
|
self.context_menu = m = QMenu(self)
|
||||||
if h is not None:
|
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')), _('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(
|
m.addAction(QIcon(I('trash.png')), ngettext(
|
||||||
'Delete this highlight', 'Delete selected highlights', len(self.selectedItems())
|
'Delete this highlight', 'Delete selected highlights', len(self.selectedItems())
|
||||||
), self.delete_requested.emit)
|
), 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.addSeparator()
|
||||||
m.addAction(_('Expand all'), self.expandAll)
|
m.addAction(_('Expand all'), self.expandAll)
|
||||||
m.addAction(_('Collapse all'), self.collapseAll)
|
m.addAction(_('Collapse all'), self.collapseAll)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user