From 182bd47b5c4803643123bd3cdda1accdbbaa4bb6 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 21 Jan 2007 05:17:06 +0000 Subject: [PATCH] * src/DisplayModels/_PeopleModel.py: save current filter for rebuild (#838) svn: r7946 --- ChangeLog | 1 + src/DataViews/_PersonView.py | 5 +++-- src/DisplayModels/_PeopleModel.py | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0935372f7..3e0325305 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 2007-01-20 Don Allingham + * src/DisplayModels/_PeopleModel.py: save current filter for rebuild (#838) * src/BaseDoc.py: save/load paragraph description (#850) * src/QuestionDialog.py: close window before calling callback * src/DataViews/_PersonView.py (PersonView.change_db): apply diff --git a/src/DataViews/_PersonView.py b/src/DataViews/_PersonView.py index 324bb0279..91c3119bb 100644 --- a/src/DataViews/_PersonView.py +++ b/src/DataViews/_PersonView.py @@ -741,8 +741,9 @@ class PersonView(PageView.PersonNavView): person = self.dbstate.db.get_person_from_handle(node) pname = person.get_primary_name() top = NameDisplay.displayer.name_grouping_name(self.db, pname) - - self.model.rebuild_data() + + self.model.rebuild_data(self.model.current_filter) + if not self.model.is_visable(node): continue diff --git a/src/DisplayModels/_PeopleModel.py b/src/DisplayModels/_PeopleModel.py index 88a93c8c3..114abfd84 100644 --- a/src/DisplayModels/_PeopleModel.py +++ b/src/DisplayModels/_PeopleModel.py @@ -160,7 +160,7 @@ class PeopleModel(gtk.GenericTreeModel): self.iter2path = {} self.path2iter = {} self.sname_sub = {} - + if filter_info and filter_info != (1, (0, u'', False)): if filter_info[0] == PeopleModel.GENERIC: data_filter = filter_info[1] @@ -183,6 +183,7 @@ class PeopleModel(gtk.GenericTreeModel): else: self._build_data = self._build_search_sub data_filter = None + self.current_filter = data_filter self.rebuild_data(data_filter, skip) def update_todo(self,client,cnxn_id,entry,data): @@ -200,6 +201,7 @@ class PeopleModel(gtk.GenericTreeModel): """ self.calculate_data(data_filter, skip) self.assign_data() + self.current_filter = data_filter def _build_search_sub(self,dfilter, skip): self.sortnames = {}