From bb2e2fd1ccdcbe3ca3239f9c6387802ecc0f2069 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 2 Jun 2005 20:31:39 +0000 Subject: [PATCH] Filter problem fixes svn: r4759 --- gramps2/ChangeLog | 4 ++++ gramps2/src/ChooseParents.py | 36 ++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index f350f20ba..9a8c85823 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2005-06-02 Don Allingham + * src/ChooseParents.py: fixed all_males filtering problem, display + all people when a person is blocked by the likely filter + 2005-06-02 Alex Roitman * src/ReadGedcom.py (get_next): Use single space to split the line into level, tag, and the field contents; strip extra white space diff --git a/gramps2/src/ChooseParents.py b/gramps2/src/ChooseParents.py index 238ad0f44..e4c886fb9 100644 --- a/gramps2/src/ChooseParents.py +++ b/gramps2/src/ChooseParents.py @@ -93,7 +93,7 @@ class ChooseParents: db.connect('person-add', self.redraw) db.connect('person-update', self.redraw) db.connect('person-delete', self.redraw) - db.connect('person-rebuild', self.redraw2) + db.connect('person-rebuild', self.redraw) # set default filters self.all_males_filter = GenericFilter.GenericFilter() @@ -286,14 +286,6 @@ class ChooseParents: def redraw(self,handle_list): self.redrawf() self.redrawm() -# self.father_model.rebuild_data() -# self.mother_model.rebuild_data() - - def redraw2(self): - self.redrawf() - self.redrawm() -# self.father_model.rebuild_data() -# self.mother_model.rebuild_data() def redrawf(self): """Redraws the potential father list""" @@ -326,7 +318,7 @@ class ChooseParents: def showallf_toggled(self,obj): if self.father_filter == self.likely_males_filter: - self.father_filter = self.all_females_filter + self.father_filter = self.all_males_filter else: self.father_filter = self.likely_males_filter self.redrawf() @@ -529,11 +521,13 @@ class ChooseParents: self.father_selection.select_path(path) self.father_list.scroll_to_cell(path,None,1,0.5,0) except KeyError: - WarningDialog(_("Added person is not visible"), - _("The person you added is currently " - "not visible due to the chosen filter. " - "This may occur if you did not specify " - "a birth date.")) + self.father_filter = self.all_males_filter + self.showallf_toggled(None) + path = self.father_model.on_get_path(handle) + top_path = self.father_model.on_get_path(name) + self.father_list.expand_row(top_path,0) + self.father_selection.select_path(path) + self.father_list.scroll_to_cell(path,None,1,0.5,0) else: try: path = self.mother_model.on_get_path(handle) @@ -542,11 +536,13 @@ class ChooseParents: self.mother_selection.select_path(path) self.mother_list.scroll_to_cell(path,None,1,0.5,0) except: - WarningDialog(_("Added person is not visible"), - _("The person you added is currently " - "not visible due to the chosen filter. " - "This may occur if you did not specify " - "a birth date.")) + self.mother_filter = self.all_females_filter + self.showallm_toggled(None) + path = self.mother_model.on_get_path(handle) + top_path = self.mother_model.on_get_path(name) + self.mother_list.expand_row(top_path,0) + self.mother_selection.select_path(path) + self.mother_list.scroll_to_cell(path,None,1,0.5,0) def add_parent_clicked(self,obj): """Called with the Add New Person button is pressed. Calls the QuickAdd