* src/ChooseParents.py (save_parents_clicked): Do not create
family if parent is self. svn: r4970
This commit is contained in:
parent
2335612283
commit
52d06de491
@ -1,3 +1,7 @@
|
|||||||
|
2005-07-26 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/ChooseParents.py (save_parents_clicked): Do not create
|
||||||
|
family if parent is self.
|
||||||
|
|
||||||
2005-07-26 Don Allingham <don@gramps-project.org>
|
2005-07-26 Don Allingham <don@gramps-project.org>
|
||||||
* src/EditPerson.py: NameDisplay enhancements
|
* src/EditPerson.py: NameDisplay enhancements
|
||||||
* src/FamilyView.py: NameDisplay enhancements
|
* src/FamilyView.py: NameDisplay enhancements
|
||||||
|
@ -555,20 +555,21 @@ class ChooseParents:
|
|||||||
self.type = "Partners"
|
self.type = "Partners"
|
||||||
father_handle = self.father.get_handle()
|
father_handle = self.father.get_handle()
|
||||||
mother_handle = self.mother.get_handle()
|
mother_handle = self.mother.get_handle()
|
||||||
self.family = self.find_family(father_handle,mother_handle,trans)
|
|
||||||
else:
|
|
||||||
self.family = None
|
|
||||||
|
|
||||||
if self.family:
|
if self.person.get_handle() in (father_handle,mother_handle):
|
||||||
if self.person.get_handle() in (father_handle,mother_handle):
|
ErrorDialog(_("Error selecting a child"),
|
||||||
ErrorDialog(_("Error selecting a child"),
|
_("A person cannot be linked as his/her own parent"),
|
||||||
_("A person cannot be linked as his/her own parent"),
|
self.window)
|
||||||
self.window)
|
return
|
||||||
return
|
|
||||||
|
if father_handle or mother_handle:
|
||||||
|
self.family = self.find_family(father_handle,mother_handle,trans)
|
||||||
self.family.add_child_handle(self.person.get_handle())
|
self.family.add_child_handle(self.person.get_handle())
|
||||||
self.family.set_relationship(self.type)
|
self.family.set_relationship(self.type)
|
||||||
self.change_family_type(self.family,mother_rel,father_rel)
|
self.change_family_type(self.family,mother_rel,father_rel)
|
||||||
self.db.commit_family(self.family,trans)
|
self.db.commit_family(self.family,trans)
|
||||||
|
else:
|
||||||
|
self.family = None
|
||||||
self.db.transaction_commit(trans,_("Choose Parents"))
|
self.db.transaction_commit(trans,_("Choose Parents"))
|
||||||
self.close(None)
|
self.close(None)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user