Edit book: Fix searching in selected files not searching SVG files

This commit is contained in:
Kovid Goyal 2018-06-05 14:28:04 +05:30
parent 85a04d93c5
commit e42e31cdcb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -745,8 +745,11 @@ class FileList(QTreeWidget):
ok = category in {'text', 'styles'}
if ok:
ans[category][name] = syntax_from_mime(name, mime)
if not ok and category == 'misc':
ok = mime in {guess_type('a.'+x) for x in ('opf', 'ncx', 'txt', 'xml')}
if not ok:
if category == 'misc':
ok = mime in {guess_type('a.'+x) for x in ('opf', 'ncx', 'txt', 'xml')}
elif category == 'images':
ok = mime == guess_type('a.svg')
if ok:
cats = []
if item.isSelected():