* src/DataViews/_PersonView.py (person_removed): Properly create

and pass the filter when searchbar is enabled (not sidebar).


svn: r7251
This commit is contained in:
Alex Roitman 2006-08-24 04:38:06 +00:00
parent dcd6d6d7c6
commit 187ed06537
2 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,6 @@
2006-08-23 Alex Roitman <shura@gramps-project.org>
* src/DataViews/_PersonView.py (person_removed): Properly create
and pass the filter when searchbar is enabled (not sidebar).
* src/FilterEditor/_FilterEditor.py (clone_filter): Add method;
Support clone-and-edit functionality.
* src/glade/rule.glade (filter_list): Add clone button.

View File

@ -60,7 +60,7 @@ import Config
import const
from Editors import EditPerson
from Filters import SearchBar
from Filters import SearchBar, SearchFilter
from Filters.SideBar import PersonSidebarFilter
from DdTargets import DdTargets
@ -678,16 +678,18 @@ class PersonView(PageView.PersonNavView):
return
if Config.get(Config.FILTER):
filter_info = (PeopleModel.GENERIC, self.generic_filter)
data_filter = self.generic_filter
else:
filter_info = (PeopleModel.SEARCH, self.search_bar.get_value())
col,text,inv = self.search_bar.get_value()
func = lambda x: self.model.on_get_value(x, col) or u""
data_filter = SearchFilter(func, text, inv)
self.model.clear_cache()
for node in handle_list:
person = self.dbstate.db.get_person_from_handle(node)
top = person.get_primary_name().get_group_name()
mylist = self.model.sname_sub.get(top,[])
self.model.calculate_data(filter_info[1], skip=set(handle_list))
self.model.calculate_data(data_filter, skip=set(handle_list))
if mylist:
try:
path = self.model.on_get_path(node)