Fix #1950495 [Virtual library: Ampersands render incorrectly in context menu](https://bugs.launchpad.net/calibre/+bug/1950495)

This commit is contained in:
Kovid Goyal 2021-11-11 07:55:43 +05:30
parent 77e087f52f
commit 9b2c742341
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -537,9 +537,10 @@ class VLTabs(QTabBar): # {{{
if i > -1:
vl = str(self.tabData(i) or '')
if vl:
vln = vl.replace('&', '&&')
m.addSeparator()
m.addAction(_('Edit "%s"') % vl, partial(self.gui.do_create_edit, name=vl))
m.addAction(_('Delete "%s"') % vl, partial(self.gui.remove_vl_triggered, name=vl))
m.addAction(_('Edit "%s"') % vln, partial(self.gui.do_create_edit, name=vl))
m.addAction(_('Delete "%s"') % vln, partial(self.gui.remove_vl_triggered, name=vl))
m.exec_(ev.globalPos())
def sort_alphabetically(self):