7179: Select an existing person causes crash in searchfilter
refix, aplay only to Windows
This commit is contained in:
parent
568b4ee4a4
commit
bfbf5d01f4
@ -24,6 +24,8 @@
|
||||
Package providing filtering framework for GRAMPS.
|
||||
"""
|
||||
|
||||
from gramps.gen.constfunc import win
|
||||
|
||||
class SearchFilter(object):
|
||||
def __init__(self, func, text, invert):
|
||||
self.func = func
|
||||
@ -31,7 +33,10 @@ class SearchFilter(object):
|
||||
self.invert = invert
|
||||
|
||||
def match(self, handle, db):
|
||||
return self.invert ^ (self.func(handle).upper().find(str(self.text)) != -1)
|
||||
if win():
|
||||
return self.invert ^ (self.func(handle).upper().find(str(self.text)) != -1)
|
||||
else:
|
||||
return self.invert ^ (self.func(handle).upper().find(self.text) != -1)
|
||||
|
||||
class ExactSearchFilter(SearchFilter):
|
||||
def __init__(self, func, text, invert):
|
||||
|
Loading…
Reference in New Issue
Block a user