mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #8352 (Alt-V gives error on book with no formats)
This commit is contained in:
parent
d9952e034b
commit
b4c9b07f68
@ -92,7 +92,12 @@ class ViewAction(InterfaceAction):
|
|||||||
formats = [list(f.upper().split(',')) if f else None for f in formats]
|
formats = [list(f.upper().split(',')) if f else None for f in formats]
|
||||||
all_fmts = set([])
|
all_fmts = set([])
|
||||||
for x in formats:
|
for x in formats:
|
||||||
for f in x: all_fmts.add(f)
|
if x:
|
||||||
|
for f in x: all_fmts.add(f)
|
||||||
|
if not all_fmts:
|
||||||
|
error_dialog(self.gui, _('Format unavailable'),
|
||||||
|
_('Selected books have no formats'), show=True)
|
||||||
|
return
|
||||||
d = ChooseFormatDialog(self.gui, _('Choose the format to view'),
|
d = ChooseFormatDialog(self.gui, _('Choose the format to view'),
|
||||||
list(sorted(all_fmts)))
|
list(sorted(all_fmts)))
|
||||||
if d.exec_() == d.Accepted:
|
if d.exec_() == d.Accepted:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user