Advanced search dialog: Fix combining of "One or more words" searches with other search types incorrect. Fixes #1691008 [Advanced Search grouping failure](https://bugs.launchpad.net/calibre/+bug/1691008)

This commit is contained in:
Kovid Goyal 2017-05-20 20:01:24 +05:30
parent b15521bd74
commit bf64759aff
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -176,7 +176,10 @@ class SearchDialog(QDialog, Ui_Dialog):
if none: if none:
ans += (' and not ' if ans else 'not ') + none ans += (' and not ' if ans else 'not ') + none
if any: if any:
ans += (' or ' if ans else '') + any if ans:
ans += ' and (' + any + ')'
else:
ans = any
return ans return ans
def token(self): def token(self):