From c46dff68a23b249a60e313745a72766ecac745c8 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 8 Mar 2005 22:24:41 +0000 Subject: [PATCH] * src/EditPerson.py (__init__): Only set update sources if possible (calls from ChooseParents don't provide the correct parent, but then the full update goes on anyway). * src/ChooseParents.py (mother_list_select_row, father_list_select_row): Comment out auto-selection of parents. svn: r4139 --- ChangeLog | 6 ++++++ src/ChooseParents.py | 4 +++- src/EditPerson.py | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b1f85a4b..49581a8b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,12 @@ * src/Marriage.py (on_add_clicked,on_event_update_clicked): Typos. * src/AddSpouse.py (select_spouse_clicked): Typo. + * src/EditPerson.py (__init__): Only set update sources if possible + (calls from ChooseParents don't provide the correct parent, but then + the full update goes on anyway). + * src/ChooseParents.py (mother_list_select_row, + father_list_select_row): Comment out auto-selection of parents. + 2005-03-07 Alex Roitman * src/AddrEdit.py: Typo. * src/EditPerson.py (on_add_addr_clicked): Typos. diff --git a/src/ChooseParents.py b/src/ChooseParents.py index af1b692d0..0c2d64176 100644 --- a/src/ChooseParents.py +++ b/src/ChooseParents.py @@ -316,7 +316,7 @@ class ChooseParents: """ if not father_handle and not mother_handle: return None - + for family_handle in self.db.get_family_handles(): family = self.db.get_family_from_handle(family_handle) if family.get_father_handle() == father_handle and family.get_mother_handle() == mother_handle: @@ -376,6 +376,7 @@ class ChooseParents: else: self.father = None + return if not self.parent_selected and self.father: self.parent_selected = 1 family_handle_list = self.father.get_family_handle_list() @@ -399,6 +400,7 @@ class ChooseParents: self.mother = self.db.get_person_from_handle(idlist[0]) else: self.mother = None + return if not self.parent_selected and self.mother: self.parent_selected = 1 diff --git a/src/EditPerson.py b/src/EditPerson.py index c6b85c078..f483680ee 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -475,7 +475,10 @@ class EditPerson: }) if self.parent: - self.update_sources = self.parent.source_view.build_tree + try: + self.update_sources = self.parent.source_view.build_tree + except AttributeError: + self.update_sources = None else: self.update_sources = None