* src/EditPerson.py (on_apply_person_clicked): Fix crash when changing gender caused by a family handle/object mismatch
svn: r4426
This commit is contained in:
parent
a918c72ef8
commit
26f4ef3bb3
@ -1,3 +1,7 @@
|
|||||||
|
2005-04-26 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
|
* src/EditPerson.py (on_apply_person_clicked): Fix crash when
|
||||||
|
changing gender caused by a family handle/object mismatch
|
||||||
|
|
||||||
2005-04-25 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2005-04-25 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/FamilyView.py: Dont crash on empty database
|
* src/FamilyView.py: Dont crash on empty database
|
||||||
|
|
||||||
|
@ -1797,7 +1797,8 @@ class EditPerson:
|
|||||||
error = False
|
error = False
|
||||||
if male and self.person.get_gender() != RelLib.Person.MALE:
|
if male and self.person.get_gender() != RelLib.Person.MALE:
|
||||||
self.person.set_gender(RelLib.Person.MALE)
|
self.person.set_gender(RelLib.Person.MALE)
|
||||||
for temp_family in self.person.get_family_handle_list():
|
for temp_family_handle in self.person.get_family_handle_list():
|
||||||
|
temp_family = self.db.get_family_from_handle(temp_family_handle)
|
||||||
if self.person == temp_family.get_mother_handle():
|
if self.person == temp_family.get_mother_handle():
|
||||||
if temp_family.get_father_handle() != None:
|
if temp_family.get_father_handle() != None:
|
||||||
error = True
|
error = True
|
||||||
@ -1806,7 +1807,8 @@ class EditPerson:
|
|||||||
temp_family.set_father_handle(self.person)
|
temp_family.set_father_handle(self.person)
|
||||||
elif female and self.person.get_gender() != RelLib.Person.FEMALE:
|
elif female and self.person.get_gender() != RelLib.Person.FEMALE:
|
||||||
self.person.set_gender(RelLib.Person.FEMALE)
|
self.person.set_gender(RelLib.Person.FEMALE)
|
||||||
for temp_family in self.person.get_family_handle_list():
|
for temp_family_handle in self.person.get_family_handle_list():
|
||||||
|
temp_family = self.db.get_family_from_handle(temp_family_handle)
|
||||||
if self.person == temp_family.get_father_handle():
|
if self.person == temp_family.get_father_handle():
|
||||||
if temp_family.get_mother_handle() != None:
|
if temp_family.get_mother_handle() != None:
|
||||||
error = True
|
error = True
|
||||||
@ -1815,7 +1817,8 @@ class EditPerson:
|
|||||||
temp_family.set_mother_handle(self.person)
|
temp_family.set_mother_handle(self.person)
|
||||||
elif unknown and self.person.get_gender() != RelLib.Person.UNKNOWN:
|
elif unknown and self.person.get_gender() != RelLib.Person.UNKNOWN:
|
||||||
self.person.set_gender(RelLib.Person.UNKNOWN)
|
self.person.set_gender(RelLib.Person.UNKNOWN)
|
||||||
for temp_family in self.person.get_family_handle_list():
|
for temp_family_handle in self.person.get_family_handle_list():
|
||||||
|
temp_family = self.db.get_family_from_handle(temp_family_handle)
|
||||||
if self.person == temp_family.get_father_handle():
|
if self.person == temp_family.get_father_handle():
|
||||||
if temp_family.get_mother_handle() != None:
|
if temp_family.get_mother_handle() != None:
|
||||||
error = True
|
error = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user