* src/GenericFilter.py (Rule,GenericFilter): New methods prepare() and
reset(), that are called before/after a filter is applied, to properly support query caches; (IsWitness): new filter; (RelationshipPathBetween,IsDescendantOf,IsLessThanNthGenerationDescendantOf, IsMoreThanNthGenerationDescendantOf,IsChildOfFilterMatch,IsSiblingOfFilterMatch, IsAncestorOf,IsAncestorOfFilterMatch,IsLessThanNthGenerationAncestorOf, IsMoreThanNthGenerationAncestorOf,IsParentOfFilterMatch,HasCommonAncestorWith): use prepare() and reset() to create a proper query cache. Currently the cache was only created once after object creation and never updated. * src/gramps_main.py: Add new filters to the menu. svn: r4171
This commit is contained in:
@@ -942,6 +942,11 @@ class Gramps:
|
||||
all.add_rule(GenericFilter.PeoplePrivate([]))
|
||||
filter_list.append(all)
|
||||
|
||||
all = GenericFilter.GenericFilter()
|
||||
all.set_name(_("Witnesses"))
|
||||
all.add_rule(GenericFilter.IsWitness([]))
|
||||
filter_list.append(all)
|
||||
|
||||
self.filter_model = GenericFilter.FilterStore(filter_list)
|
||||
self.filter_list.set_model(self.filter_model)
|
||||
self.filter_list.set_active(self.filter_model.default_index())
|
||||
|
Reference in New Issue
Block a user