From bfbf5d01f4150d5e75dcf8b5a2411550ffc66e15 Mon Sep 17 00:00:00 2001 From: Josip Date: Mon, 6 Jan 2014 21:08:40 +0100 Subject: [PATCH] 7179: Select an existing person causes crash in searchfilter refix, aplay only to Windows --- gramps/gen/filters/_searchfilter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gramps/gen/filters/_searchfilter.py b/gramps/gen/filters/_searchfilter.py index 4b4519e34..a8bcb86c9 100644 --- a/gramps/gen/filters/_searchfilter.py +++ b/gramps/gen/filters/_searchfilter.py @@ -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):