From e07ffbcdd413a97b3c10658d27712ebc6c87908a Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 28 Aug 2004 19:49:34 +0000 Subject: [PATCH] * src/EditPerson.py: make a distiction between adding a person and editing a person. * src/PeopleView.py: drop unused goto_active_person parameter * srcgramps_main.py: drop unused goto_active_person parameter svn: r3517 --- ChangeLog | 6 ++++++ src/EditPerson.py | 5 ++++- src/PeopleView.py | 2 +- src/gramps_main.py | 6 +++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 100bf2a16..422580b6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-08-28 Don Allingham + * src/EditPerson.py: make a distiction between adding a person + and editing a person. + * src/PeopleView.py: drop unused goto_active_person parameter + * srcgramps_main.py: drop unused goto_active_person parameter + 2004-08-27 Tim Waugh * src/SelectObject.py (SelectObject.redraw): Use GRAMPS ID for user display. diff --git a/src/EditPerson.py b/src/EditPerson.py index 9657a4f86..6c9b00f2a 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -1614,7 +1614,10 @@ class EditPerson: if self.lists_changed: self.person.set_source_reference_list(self.srcreflist) - self.db.commit_person(self.person, trans) + if self.person.get_handle() == None: + self.db.add_person(self.person, trans) + else: + self.db.commit_person(self.person, trans) n = self.person.get_primary_name().get_regular_name() self.db.transaction_commit(trans,_("Edit Person (%s)") % n) self.update_lists() diff --git a/src/PeopleView.py b/src/PeopleView.py index dcb61ba23..126b948d9 100644 --- a/src/PeopleView.py +++ b/src/PeopleView.py @@ -185,7 +185,7 @@ class PeopleView: def add_to_person_list(self,person,change=0): self.apply_filter_clicked() - def goto_active_person(self,first=0): + def goto_active_person(self): if not self.parent.active_person: return p = self.parent.active_person diff --git a/src/gramps_main.py b/src/gramps_main.py index 38ca5470d..51d8a36fd 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -1,4 +1,4 @@ - +# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2004 Donald N. Allingham @@ -1294,8 +1294,8 @@ class Gramps: self.people_view.redisplay_person_list(p1) self.update_display(0) - def goto_active_person(self,first=0): - self.people_view.goto_active_person(first) + def goto_active_person(self): + self.people_view.goto_active_person() def change_active_person(self,person,force=0): if person == None: